[Newbie] Simple, bare-bones PHP/MySQL database examples?

This is a discussion on [Newbie] Simple, bare-bones PHP/MySQL database examples? within the PHP Language forums, part of the PHP Programming Forums category; (Let me first say that I'm a non-programmer/newbie asking for something very basic here, so every pro ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-09-2005
wintermute_101_nospam@yahoo.de
 
Posts: n/a
Default [Newbie] Simple, bare-bones PHP/MySQL database examples?

(Let me first say that I'm a non-programmer/newbie asking for something
very basic here, so every pro is welcome to roll his eyes in disgust
....)

I'd finally like to move all my data (PIM, CD archive etc.) from trusty
old FileMaker to a Apache/MySQL/PHP based solution. I have no
experience with any of these, though, and I would be grateful for a
simple, bare-bones set of files (samples and maybe a tutorial) to start
with - something I can learn from to avoid the frustration of making
every dumb beginner's mistake.

I have access to webspace with MySQL, PHP and phpMyAdmin, so what I
need from there is a set of (preferably commented) .php files to:

1) Generate the actual tables in the DB and their fields - or should
this normally be done using phpMyAdmin?

2) A sample input page to connect to a table in the database and
add/list/edit/delete entries.

3) A sample output page that shows how to query a table, generate a
sortable list of entries ("All CDs with artists whose name start with
A, twenty entries per page") and from there go to ...

4) A sample "details" output page showing a single entry.


There are three other topics where I am not sure how these are normally
achieved:

a) Permissions: I want to be able to restrict access to
listing/adding/editing/deleting database entries. How is this normally
done? Do I need a "users" table in my DB? How would I use this?

b) Import/export data to/from .csv files.

c) Transforming data on input/output: Both when submitting and reading
data (i.e., building HTML pages from it), I'd like to run data through
some Regular Expressions or some kind of "translation table" that will
e.g. turn special characters in HTML entities. How would I do this?


I know all the above must be pretty trivial/basic to anyone with PHP
knowledge, but as a kind of low-tech guy :) guy, I find it hard to
grasp these things, at least when starting from zero. So a kind of
"starter package" would be highly appreciated.

I would also appreciate some reading tips, but 800 page PHP/MySQL
bibles won't help - I simply cannot learn the whole technology from
scratch when I just have one particular application.


Thank you.

Reply With Quote
  #2 (permalink)  
Old 01-09-2005
Pedro Graca
 
Posts: n/a
Default Re: [Newbie] Simple, bare-bones PHP/MySQL database examples?

wintermute_101_nospam@yahoo.de wrote:
> So a kind of
> "starter package" would be highly appreciated.


Start here:

<?php
echo 'Hello, World!';
?>

--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!
Reply With Quote
  #3 (permalink)  
Old 01-09-2005
Al. C
 
Posts: n/a
Default Re: [Newbie] Simple, bare-bones PHP/MySQL database examples?

wintermute_101_nospam@yahoo.de wrote:

(long laundry list of requests)

> I know all the above must be pretty trivial/basic to anyone with PHP
> knowledge, but as a kind of low-tech guy :) guy, I find it hard to
> grasp these things, at least when starting from zero. So a kind of
> "starter package" would be highly appreciated.
>
> I would also appreciate some reading tips, but 800 page PHP/MySQL
> bibles won't help - I simply cannot learn the whole technology from
> scratch when I just have one particular application.


This is like the guy who graduates college on Friday with a BA in English Lit.
and who walks into the local hospital on Monday, goes to the front desk and
tells the clerk "I'd like a job doing neurosurgery on people with brain
cancer. Can you give me tips, pointers, and maybe a book to read on how to do
that?"

Do yourself a favor and hire a "pro" to get this done for you. In the long run
it will be less expensive and you'll get a much better result in far less
time.

Al C.
__________________________________________________ ________
Adams-Blake Company, Inc.
***
JAYA123 - the web-based total-office system for the
small biz. Order entry, billing, bookkeeping, etc. for $14.95
a month. Perfect for the small business or start-up.
See demo at: http://www.jaya123.com
***


Reply With Quote
  #4 (permalink)  
Old 01-09-2005
Ronald Chaplin
 
Posts: n/a
Default Re: [Newbie] Simple, bare-bones PHP/MySQL database examples?

wintermute_101_nospam@yahoo.de wrote:
> I'd finally like to move all my data (PIM, CD archive etc.) from trusty
> old FileMaker to a Apache/MySQL/PHP based solution. I have no
> experience with any of these, though, and I would be grateful for a
> simple, bare-bones set of files (samples and maybe a tutorial) to start
> with - something I can learn from to avoid the frustration of making
> every dumb beginner's mistake.


Hello,

Try out this site. http://www.w3schools.com/php/default.asp
specifically, http://www.w3schools.com/php/default.asp

Excellent tutorials with plenty of info on a lot of different
web-service technologies.

HTH


Reply With Quote
  #5 (permalink)  
Old 01-09-2005
lig
 
Posts: n/a
Default Re: [Newbie] Simple, bare-bones PHP/MySQL database examples?

go to codewakers.com and in the tutorials/basics section you will see a
tutorial named "Creating Dynamic Websites with PHP and MySQL". The
tutorial covers from the installation of MySQL and PHP (so feel free to
skip that) to creating tables and inserting, retreiving, modifiying and
deleting data in the tables. It shows you some of the basic HTML and
forms as well.

I always recommend this tutorial to people who are just starting out.

As for the rest of your requirements - look at the other tutorials.
You will find that most of what you want is covered also. Your
application can be a great learning experience or a huge headache. If
you don't want to take the time and learn and code it yourself there
are plenty of sites that will help you find a freelance coder to do it
for you. But remember - Nothing is free and you get what you pay for.

Reply With Quote
  #6 (permalink)  
Old 01-10-2005
Steve
 
Posts: n/a
Default Re: [Newbie] Simple, bare-bones PHP/MySQL database examples?

Al. C wrote:
> wintermute_101_nospam@yahoo.de wrote:
>
> (long laundry list of requests)
>
>
>>I know all the above must be pretty trivial/basic to anyone with PHP
>>knowledge, but as a kind of low-tech guy :) guy, I find it hard to
>>grasp these things, at least when starting from zero. So a kind of
>>"starter package" would be highly appreciated.
>>
>>I would also appreciate some reading tips, but 800 page PHP/MySQL
>>bibles won't help - I simply cannot learn the whole technology from
>>scratch when I just have one particular application.

>
>
> This is like the guy who graduates college on Friday with a BA in English Lit.
> and who walks into the local hospital on Monday, goes to the front desk and
> tells the clerk "I'd like a job doing neurosurgery on people with brain
> cancer. Can you give me tips, pointers, and maybe a book to read on how to do
> that?"
>
> Do yourself a favor and hire a "pro" to get this done for you. In the long run
> it will be less expensive and you'll get a much better result in far less
> time.
>
> Al C.
> __________________________________________________ ________
> Adams-Blake Company, Inc.
> ***
> JAYA123 - the web-based total-office system for the
> small biz. Order entry, billing, bookkeeping, etc. for $14.95
> a month. Perfect for the small business or start-up.
> See demo at: http://www.jaya123.com
> ***
>
>

....and you were never a newbie? I don't see any problem with this - got
a problem that needs solving, chosen the tools, now want to know how to
use them.

No timeframe specified, just a private learning curve. Just because you
see fit to advertise your products in your .sig makes you a god?

Grow up.

Steve
Reply With Quote
  #7 (permalink)  
Old 01-10-2005
David Winter
 
Posts: n/a
Default Re: [Newbie] Simple, bare-bones PHP/MySQL database examples?

Great step-by-step tutorial, and they even have a nice PDF version
(http://codewalkers.com/tutorialpdfs/tutorial9.pdf). Thank you.

I will try to start from there and maybe ask a pro should my head
explode.

Reply With Quote
  #8 (permalink)  
Old 01-10-2005
David Winter
 
Posts: n/a
Default Re: [Newbie] Simple, bare-bones PHP/MySQL database examples?

> This is like the guy who graduates college on Friday with a BA in
> English Lit. and who walks into the local hospital on Monday, goes
> to the front desk and tells the clerk "I'd like a job doing
> neurosurgery on people with brain cancer.


No, it's not. It's more like the tourist guy who is asking for the map
to a new city and a few recommendations from the locals. I'm not out to
become Mr. Top Neurosurgeon/PHP whiz (never will be, don't need to), I
just asked for a kind of template that I can try to understand and
modify.


> Do yourself a favor and hire a "pro" to get this done for you.


I regularly hire pros in their respective area when working for my own
clients. Everything else would be irresponsible, especially when
spending other people's money.

In this case, however, I am working without a budget, and I want to
learn something, too; but not start from Point Zero.

BTW, I think that professionalism is also characterized by a sense for
self marketing. I may actually hire someone for this once I have the
budget and/or cannot finish this on my own, but my money surely won't
go to the snob who told me to get lost in the first place.

Reply With Quote
  #9 (permalink)  
Old 01-10-2005
David Winter
 
Posts: n/a
Default Re: [Newbie] Simple, bare-bones PHP/MySQL database examples?

> Start here:
> <?php
> echo 'Hello, World!';
> ?>


Gee, thanks a *lot* for this helpful answer. I hope that when you need
some advice in my area of expertise, you will find people as helpful
and friendly as yourself.

This is an attitude I find even worse than plain arrogance. Programmers
claim (and rightly so) that programming is more an art than a technical
task. But admitting I don't have the talent to start from scratch and
asking for some headstart isn't humble enough, either - it's "Go the
hard way or stay away."

Reply With Quote
  #10 (permalink)  
Old 01-10-2005
David Winter
 
Posts: n/a
Default Re: [Newbie] Simple, bare-bones PHP/MySQL database examples?

> http://www.w3schools.com/php/default.asp
> Excellent tutorials with plenty of info on a lot of different

web-service technologies.

Great tutorials in fact, but I found the sheer amount of "low level"
information a bit overwhelming.

In the meantime, I have found phpMyEdit, which seems like a great
starting place. It seems to do a lot out of the box, and I will try to
move on from there.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:53 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0