0

Hello there,

I need some help with a query ..

Table

gamedate cutofftime
2011-08-25 13:55

I want to list games that are today +7 days but today games where the cutoff time has passed should not be displayed.

Can anyone help me with this query please.

Thank you for any help.

Peter

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by ppohlmann
0

Query is below .. but it is "phped" ..

$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())

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.