I have a Win2k server running II5 and aother machine running MySQL. I have set the section in the PHP.ini for mysql_host to the MySQL machine.
I can connect okay and display the list of database's fine but it will not let me display all the tables in a database I just keep getting:
Warning: Supplied argument is not a valid MySQL result resource in ../new/links.php on line 32
the code is below:
$db = mysql_connect("RAM");
$tb_list = mysql_list_tables($db);
$i = 0;
$cnt = mysql_num_rows($tb_list);
while ($i < $cnt) {
echo mysql_tablename($tb_list, $i) . "\n";
$i++;
}
mysql_close($db);
can anyone sort me out???
I can connect okay and display the list of database's fine but it will not let me display all the tables in a database I just keep getting:
Warning: Supplied argument is not a valid MySQL result resource in ../new/links.php on line 32
the code is below:
$db = mysql_connect("RAM");
$tb_list = mysql_list_tables($db);
$i = 0;
$cnt = mysql_num_rows($tb_list);
while ($i < $cnt) {
echo mysql_tablename($tb_list, $i) . "\n";
$i++;
}
mysql_close($db);
can anyone sort me out???