Voodoo Jai Posted September 25, 2008 Share Posted September 25, 2008 I am getting the following error msg: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/poochima/daytripper.com/counter.php3 on line 8 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/poochima/daytripper.com/counter.php3 on line 22 and this is the code it refers to $result=mysql("Counters","SELECT * FROM count WHERE Base='$Base' AND URL='$URL'"); LINE 8 next while ($row = mysql_fetch_row($result)) { $ChkBase=$row[0]; $ChkURL=$row[1]; $ChkCount=$row[2]; $Count=$ChkCount; } if ($ChkURL == "") : mysql("Counters","INSERT INTO count VALUES ('$Base','$URL','0')"); $Count=0; endif; $Count++; mysql("Counters","UPDATE count SET Number='$Count' WHERE Base='$Base' AND URL='$URL'"); $result=mysql("Counters","SELECT * FROM count WHERE Base='$Base' AND URL='$URL'"); LINE 22 next while ($row = mysql_fetch_row($result)) { $Base=$row[0]; $URL=$row[1]; $Count=$row[2]; } I cannot see what the problem is. VoodooJai Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted September 25, 2008 Share Posted September 25, 2008 Unless you have written a function called mysql() that contains a mysql_query() function call, that code is not executing a mysql_query() statement. And if you have written a function called mysql(), you would need to post it to get help with why it is not working. Quote Link to comment Share on other sites More sharing options...
Voodoo Jai Posted September 25, 2008 Author Share Posted September 25, 2008 Here is the function below: mysql("Counters","UPDATE Count SET Number='$Number' WHERE Base='$Base' AND URL='$URL'"); hope this helps Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.