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

lets see the query that you are working on.

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.