[thelist] Remedial PHP - MySQL

Luther, Ron ron.luther at hp.com
Thu Feb 17 08:06:37 CST 2005

Burhan Khalid noted:

>>The function mysql_list_tables() is deprecated. 

Hi Burhan,

Dang.  Okay.  I guess it's been longer than I thought.  
Thanks for the 'heads up'!

I tried your code. (I even echoed the value in '$database' to make sure
was good.)  The following gives me _no_ error message ... and no

$query  = "SHOW TABLES from $database";
$result = mysql_query($query);
if (!$result) { 
   die($query."<br />".mysql_error()); 
   echo "Query Ran \n";     <---- this line outputs okay

while($row = mysql_fetch_assoc($result)) {
    echo "<pre>Elmer "; print_r($row); echo " Fudd</pre>";

It doesn't seem to be seeing my tables! I went back into phpMyAdmin this

morning and it doesn't seem to allow me to use the little entry form to 
change my database names. (It complains that I am trying to 'create' a
db instead of renaming an existing db.)

I will try talking to my host ... Maybe I'm running into a config issue.



More information about the thelist mailing list