Page 1 of 1

Warning: mysql_num_fields(): supplied argument is not a vali

Posted: Thu Apr 03, 2008 6:32 am
by thosecars82
hello guys
I'm stuck with this problem.
It turns out that I just uploaded a kind of helloworld php web to freehostia to test it there and it works fine at there. Nevertheless it does not work on my computer. I am using xampp, apache and mysql. It seems mysql and appache are working. The errors i get are these:

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\pruebalocal1\clase_mysql.inc.php on line 61

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\pruebalocal1\clase_mysql.inc.php on line 80

I do not understand why this work in the server and it does not work on my laptop.
The code which does not work is mysql_num_fields() and mysql_fetch_row().
Please, any help would be appreciated.

Re: Warning: mysql_num_fields(): supplied argument is not a vali

Posted: Thu Apr 03, 2008 1:34 pm
by Christopher
You probably do not have a connection to the database.

Re: Warning: mysql_num_fields(): supplied argument is not a vali

Posted: Thu Apr 03, 2008 3:45 pm
by thosecars82
thks Christopher. That was exactly the problem in my php file because i hadn't put exactly the name of the database i was using in mysql.thks again