gple Posted December 29, 2009 Share Posted December 29, 2009 $schedule=mysql_query("select * from schedule where date>'2009-09-01' and division='1' and ((team1='$team1' and team2='team2') or (team1='$team2' and team2='$team1'))"); does not output anything Link to comment https://forums.phpfreaks.com/topic/186549-help-with-select-statement/ Share on other sites More sharing options...
gple Posted December 29, 2009 Author Share Posted December 29, 2009 nevermind, i should always look over what I post before I do. sorry Link to comment https://forums.phpfreaks.com/topic/186549-help-with-select-statement/#findComment-985191 Share on other sites More sharing options...
premiso Posted December 29, 2009 Share Posted December 29, 2009 Date is a reserved word in MySQL. You can find a list of them here. You can either change it (preferred) or use back ticks around that column name to get it to work. Also you should implement error checking like so: $schedule=mysql_query("select * from schedule where date>'2009-09-01' and division='1' and ((team1='$team1' and team2='team2') or (team1='$team2' and team2='$team1'))") or trigger_error("Query Failed: " . mysql_error()); As it would have told you the error. Link to comment https://forums.phpfreaks.com/topic/186549-help-with-select-statement/#findComment-985192 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.