[SOLVED] mysql_num_rows(): is not a valid Mysql Result
Posted: Wed Jun 30, 2004 3:39 pm
I am trying to setup a script that searches in a database does calculations and posts the player of the game for a football league. I get this error though when the script has run Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\phpdev\www\rfl\update\load_pog.php on line 24
also on line 176 but the lines are the same exact code. The line is
and the few lines before and after are
I searched around for some answers in forums and manuals with not much luck.. probably cause im pretty ne to php and the manuals are just mumbo jumbo to me lol. If you have any ideas I would greatly appreciate them. Thanks ahead of time.
also on line 176 but the lines are the same exact code. The line is
Code: Select all
<?php
$num_rows = mysql_num_rows($res);
?>Code: Select all
<?php
$get_gameids = "select game_summary.game_id, home_team, home_final, away_team, away_final from game_teamstats, game_summary where game_teamstats.game_id=game_summary.game_id and league_id=$league_id and season=$season and week=$week and (home_total_offense+away_total_offense<625 or home_passing_tds+home_rushing_tds+away_passing_tds+away_rushing_tds<4 or home_turnovers+away_turnovers>4)";
$res=mysql_query($get_gameids,$db);
$num_gameids = mysql_num_rows($res);
for($count=0;$count<$num_gameids;$count++){
$game_id = mysql_result($res,$count,"game_id");
?>