Jump to content

Help with Select Statement


gple

Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.