Jump to content

[SOLVED] Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resou


thosecars82

Recommended Posts

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:\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.

 

Thanks. Someone eventually told me that the problem was at doing the connection in my php file to the mysql database. The name of my database in mysql was sligthly different to the one i had put in my php file so it didn't even't get connected. But now i've just changed the database name i was using in php to connect.

thks anywas

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.