hello,
i am learning PHP and MySQL recently, i use PHP to
connect to MySQL server,
however, an error occur:
"Fatal error: Call to undefined function:
mysql_connect() in /var/... on line 2"
Following is the PHP program:
1 <?php
2 $linkhandle = mysql_connect("192.168.0.1", "john",
"password");
3 $result = mysql_list_dbs($linkhandle);
4 $num_rows = mysql_num_rows($result);
5 while($db_data = mysql_fetch_row($result)) {
6 echo $db_data[0]."<br>";
7 $result2 = mysql_list_tables($db_data[0]);
8 $num_rows2 = mysql_num_rows($result2);
9 while($table_data = mysql_fetch_row($result2)) {
10 echo "--".$table_data[0]."<br>";
11 }
12 echo "==> $num_row2 table(s) in ".$db_data[0].
"<p>";
13 }
14 ?>
PHP version: 4.0.4
MySQL version: 3.23.36-1
But i use the same hostname, username and password
to connect MySQL at client side, it is no problem, so
i don't kown what's wrong in the program.
Can anyone solve my problem, any reply will be
appreciated, thanks.
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]