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

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 is working. The errors i get are these:

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in C:xampphtdocspruebalocal1clase_mysql.inc.php on line 61

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:xampphtdocspruebalocal1clase_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.

Well, what does your program look like? Show us the portions that surround the lines indicated in the warnings. Have you tried debugging (see the link in my signature)? Echo statements will greatly help you figure out what the problem is. Your host may just have error reporting disabled by default, which could explain the lack of warnings there.

Sponsor our Newsletter | Privacy Policy | Terms of Service