$query= "SELECT * FROM usrteams JOIN games ON (trim(usrteams.team)=trim(games.home) or trim(usrteams.team)=trim(games.visitor )) where usrteams.usrid='".$Userid."' and '".$elcurrenttime."' <=
games.cutofftime and games.gamedate='".$todaydate."' and games.gamedate >='".$todaydate."' and games.league='".$receivedleague."' order by games.gamedate asc limit 0,1 " or die(mysql_error())
Maybe that makes more sense.. but it does not deliver the game listing..
SELECT * FROM usrteams JOIN games ON (trim(usrteams.team)=trim(games.home) or trim(usrteams.team)=trim(games.visitor )) where usrteams.usrid='10' AND games.gamedate >'2011-08-22' AND ('2011-08-22 20:14:58' < (SELECT CONCAT( games.gamedate, ' ', games.cutofftime ) FROM games where usrteams.usrid='10' and games.league='MLB' limit 1 )) AND games.league='MLB' order by games.gamedate asc limit 0,2