MYSQL Problem
Moderator: General Moderators
- Mastermind
- Forum Commoner
- Posts: 36
- Joined: Thu Mar 10, 2005 2:38 am
- Location: CDO,Philippines
- Contact:
MYSQL Problem
What is the code and procedure to connect your mysql database in your php program give some tutorial i need to connect
- thomas777neo
- Forum Contributor
- Posts: 214
- Joined: Mon Mar 10, 2003 6:12 am
- Location: Johannesburg,South Africa
http://www.php.net/mysql is the best place to start for learning how to communicate with mysql. don't get frustrated with this response. we could tell you all day how to do it, but you won't learn, thus your attempts at php will be in vain. however, look at the bright side. in 10 minutes max you'll see the answer and a nice explanation on how to connect to it, and do other things as well...all the while learning 
Well, I suppose I'll give you the answer you like, and the answer the people on this forum will hate. But I learn things by doing, and being shown, so I will show you how.
I hope you will look at this syntax and not just copy/paste.
Code: Select all
$db = mysql_connect("hostname", "username", "password");
mysql_select_db("database_name", $db);- Bill H
- DevNet Resident
- Posts: 1136
- Joined: Sat Jun 01, 2002 10:16 am
- Location: San Diego CA
- Contact:
The problem with that, scrotaye, is that in a day or so we will get another request like, "How do I insert data?" and then "How do I find out what the database holds?" If the reader actually goes to the manual and reads it, he will learn far, far more than asking individual questions since he will learn things about which he would not have thought to ask.
- Mastermind
- Forum Commoner
- Posts: 36
- Joined: Thu Mar 10, 2005 2:38 am
- Location: CDO,Philippines
- Contact: