I have the query below.. the aim of it is to output a list of the upcoming games and when the games occur they will be removed from the list. Everything goes fine until I get to the "proposedGame.time > CURRENT_TIME"
If I have a game in 3 days time at 4pm, and the time is 6pm today (3 days before) it will remove the game from the list though it is pending. I'm pretty new to SQL so I'm sure it's something very simple but I can't get my head around it. I thought about concatenating the date and time and then comparing it for the sake of ordering the table correctly but not sure how... and it is important that I do need the date and time seperate..
"SELECT h.teamName as Home, proposedGame.time AS Time, proposedGame.date AS Date, a.teamName AS Away FROM
proposedGame, team a, team h WHERE proposedGame.hostTeamID = h.teamID && proposedGame.opposingTeamID = a.teamID && (
proposedGame.date >= CURRENT_DATE && proposedGame.time > CURRENT_TIME) = TRUE ORDER BY date ASC, time ASC;";