blue-genie Posted May 26, 2010 Share Posted May 26, 2010 $sql = "SELECT * from (gamedetails left join gamestats on gamedetails.gameID) left join gameprizes on gameprizes.gamePrizeID = gamedetails.gameID left join playerdetails on gamestats.statsPlayerID = playerdetails.playerID WHERE date(startDate) <= date('".$compDateStr."') and date(endDate) >= date('".$compDateStr."') and gameIsActive = 1 ORDER BY SCORE desc LIMIT 11"; compDateStr is some dodgy thing i'm doing as follows $today = getdate(); $y = $today[year]; $m = $today[mon]; $d = $today[mday]; $compDateStr = "".$y."-".$m."-".$d.""; so if i don't have an ID to retrieve data by i want to get what falls between a certain time frame, but I'm getting more stuff then I'm supposed to. Link to comment https://forums.phpfreaks.com/topic/202950-my-select-statement-is-not-returning-what-i-was-hoping/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.