thosecars82 Posted April 3, 2008 Share Posted April 3, 2008 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. Link to comment https://forums.phpfreaks.com/topic/99348-solved-warning-mysql_num_fields-supplied-argument-is-not-a-valid-mysql-result-resou/ Share on other sites More sharing options...
trq Posted April 3, 2008 Share Posted April 3, 2008 This usually meens your query has failed. We need to see some code. Link to comment https://forums.phpfreaks.com/topic/99348-solved-warning-mysql_num_fields-supplied-argument-is-not-a-valid-mysql-result-resou/#findComment-508373 Share on other sites More sharing options...
thosecars82 Posted April 3, 2008 Author Share Posted April 3, 2008 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 Link to comment https://forums.phpfreaks.com/topic/99348-solved-warning-mysql_num_fields-supplied-argument-is-not-a-valid-mysql-result-resou/#findComment-508410 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.