I am programming in php. php and mysql are installed on SUSE linux platform. Any other thing in php is successful. But when I try to connect to mysql server, it fails. I am very sure that there is no syntax error in my program. and I have turned off all the firewalls on my linux computer.If you want to see how my codes are:
$db = mysql_connect("localhost");
mysql_select_db("umuryango",$db);
$query = "SELECT * FROM abavandimwe";
$result = mysql_query($query);
$table = mysql_field_table($table,0);
echo $table
?>
here my intertion was to echo the name of the table on the browser using localhost/db.php db.php being the name of the file
umuryango is the database name and abavandimwe is the table name that I created on mysql server. With nothing displayed on the browser I concluded that there is no connection between php and mysql. So I need your help.
2007-05-05
00:25:59
·
4 answers
·
asked by
Olivier N
1
in
Computers & Internet
➔ Programming & Design