I found another strange problem. I am creating a mysql database connection like this:
@ $db = mysql_pconnect(host, user, pass); mysql_select_db(dbname);
you forgot the $ ... should be mysql_select_db($dbname);
If you had turned up your php error reporting level (error_reporting(E_ALL); for example) it whould have given you a notice about undeclared constant for that line.
A php-aware syntax highlighting editor would have also given you a visual cue about the possible "error" on that mysql_select_db() line.
Also, I don't see where you are setting $dbname to something. You might have just not included it in your excerpt, but it may also be missing from your script :)
Now, I have a function that inside uses mysql_list_fields()
function getFields($table, $dbname) { $fields = mysql_list_fields($dbname, $table); return $fields; }
you can just do this return mysql_list_fields($dbname, $table);
-- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php