Page 1 of 1

NOT valid MySQL result resource ????

Posted: Sat Mar 20, 2004 2:04 pm
by derek233
i am getting this error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/derek233/www/rocreation/userRoutes.php on line 30

my php (line 28,29, and 30) looks like this:

$query = "SELECT * FROM routeData ";
$result = mysql_query($query);
$numRoutes = mysql_num_rows($result);

here is the actual error ocurring online:
http://www.zoorasta.com/rocreation/userMain.html

The above code works on my local Apache web server, but when i upload the php to phpwebhosting.com i am getting this error. Can anyone explain this????

Posted: Sat Mar 20, 2004 2:19 pm
by markl999
Try:
$result = mysql_query($query) or die(mysql_error());

Posted: Sat Mar 20, 2004 2:54 pm
by derek233
YOU ROCK :D

Ok, the problem was the table name was Case sensitive on their server. So, calling routedata was not the same as calling routeData.

Thanks this forum ROCKS!!!!