Jump to content

mysql_fetch_array error, mysql_error not being activated, query works in DB!


kernelgpf

Recommended Posts

This is a really weird problem. I copy and paste the query into phpmyadmin and it works, the mysql_error on the end of the query is not activated though I get the "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/arobyn7/public_html/agility/crons76021/30minutes.php on line 5" error. As I said, the query copied+pasted not only works in phpmyadmin but also returns rows.

 

$query=mysql_query("select d.owner,d.energy,d.id,o.loggedintoday,d.hunger,d.age,d.accident from dogs as d,users as o where d.owner=o.id and o.loggedintoday='yes'")or die(mysql_error());
while($row=mysql_fetch_array($query)){
//stuff
}

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.