Hi! I am stumped with this issue in my PHP code. I am trying to pull from a simple table that contains a fantasy football schedule. There are 6 games a week, and I want to pull all the games for a particular week_ID. All I get from this is the first record (game) from that week. Up until now I have had to manually specify the unique game_ID's and run the query in a for loop. Any suggestions? My query is below.
$query = "SELECT * FROM schedule WHERE week_ID = $cweek";
$result = mysql_query($query);
while ($myrow = mysql_fetch_array($result)) {
A couple other notes, $cweek is a variable for the current week. I have tried replacing this with the exact number and I still only get the first record for that week. Also, I haven't posted the code in this loop because it is quite lengthy. Let me know if you think that might be the problem. Finally, I am running this PHP code through on a Linux CLI every 5 minutes during the games using CRON.
Thanks for your time!
Rhman