Page 1 of 1
First MySQL Database
Posted: Fri Sep 15, 2006 1:51 am
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
Posted: Fri Sep 15, 2006 3:53 am
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).
Posted: Fri Sep 15, 2006 9:59 am
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.