ninedoors Posted September 22, 2007 Share Posted September 22, 2007 Here is the code I tried using. $today = date("Y-m-d"); $query = "SELECT hometeam, visitingteam, date, showdate, time FROM schedule WHERE date >= '$today' ORDER BY gamenumber LIMIT 0, 20"; $result = mysql_query($query); $result1 = mysql_fetch_assoc($result); print_r($result1); The reason I am trying to echo the gamenumber was to make sure that it was working. All I get is the first row in the DB when I run this query. The date column in my database has the format 2007-09-22(YYYY-MM-DD). I'm not sure if this is the problem or it is something else. What I want to achieve here is to take the date the user looks at the webpage and give him the next 20 games on my schedule. If you need anything else let me know. Thanks in advance. Nick Quote Link to comment Share on other sites More sharing options...
mezise Posted September 22, 2007 Share Posted September 22, 2007 Hi Nick, May you post the result of print_r($result1); ? Are you sure there is more then one record with $today date or later date? Michal 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.