paulman888888 Posted November 28, 2008 Share Posted November 28, 2008 Hi guys; Simple question WHAT HAVE I DONE WRONG? Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/site/2.php on line 21Thats the error! $ephp9=date('y').'/'.date('m').'/28'; $event_28 = mysql_num_rows(mysql_query("SELECT FROM chess_events WHERE thedate='$ephp9'")); Heres the code! Thankyou All Paul Quote Link to comment Share on other sites More sharing options...
rhodesa Posted November 28, 2008 Share Posted November 28, 2008 $ephp9=date('y').'/'.date('m').'/28'; $event_28_result = mysql_query("SELECT FROM chess_events WHERE thedate='$ephp9'") or die(mysql_error()); $event_28 = mysql_num_rows($event_28_result); edit: also, the date format for MySQL is: YYYY-MM-DD $ephp9=sprintf('%s-%s-28',date('Y'),date('m')); 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.