First MySQL Database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
gkwhitworth
Forum Commoner
Posts: 85
Joined: Tue Sep 05, 2006 8:28 pm
Location: Wasilla, Alaska

First MySQL Database

Post by gkwhitworth »

I am new to PHP and really am looking forward to data driven websites. I am used to using ASP and Access for data driven stuff, which is okay if you have 5 people viewing your website and updating at once....but the smart way, is MySQL so....I want to learn it. And from surfing I have discovered that all of the database information is controlled by the PHP. So you create the tables and everything using php?

So I want to create a small stupid database to test, so if someone could help me out that would be great. Oh yeah...I have mySql on my home computer but it is hosted somewhere else...they have MySql on their server though... I guess I just have lots of questions.

--
Greg
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

PHP is actually passing SQL queries to MySQL. MySQL interprets the query, prepares the results and passes them back to PHP. So, you're really learning two different languages. Try googling "php mysql tutorial" -- there are tons of good ones that'll have you well on your way (and answer most of your questions in the process).
GM
Forum Contributor
Posts: 365
Joined: Wed Apr 26, 2006 4:19 am
Location: Italy

Post by GM »

gkwhitworth wrote: And from surfing I have discovered that all of the database information is controlled by the PHP. So you create the tables and everything using php?
As aaronhall says above, PHP passes the commands to the database used to extract/insert data. It is certainly possible to use PHP to create tables, but it is better to use the MySQL console, or some DB front-end software to make changes to the DB schemas.
gkwhitworth wrote: So I want to create a small stupid database to test, so if someone could help me out that would be great.
Rather than making a small stupid database, why don't you try and make something you can use?

Ideas:

CD Collection
Recipies
Simple Accounting system

You can practice your database design skills in MySQL, and your programming and design skills in PHP/HTML/CSS.

And, at the end of it, you've got something you can use. I ound it much easier to learn things if I started with a purpose - coding for the sake of coding won't push you at all.
Post Reply