Siggles Posted November 25, 2007 Share Posted November 25, 2007 Hi, I have a dbase with some gigs that has a date field. The SELECT statement currently says... SELECT * FROM `Gigs` ORDER BY `Eventdate` ASC LIMIT 3 which works fine but I also want the statement to only show gigs that havent happened yet or that are > than today's day. I tried WHERE Evevntdate > CURRENT_DATE or something along those lines but so far havent got it to work. Any ideas? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/78769-solved-simple-select-statement-question/ Share on other sites More sharing options...
BenInBlack Posted November 25, 2007 Share Posted November 25, 2007 well in MySql it is SELECT * FROM Gigs WHERE date(Eventdate) >= CURRENT_DATE() ORDER BY Eventdate ASC LIMIT 3 Quote Link to comment https://forums.phpfreaks.com/topic/78769-solved-simple-select-statement-question/#findComment-398625 Share on other sites More sharing options...
Siggles Posted November 25, 2007 Author Share Posted November 25, 2007 Great! Works! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/78769-solved-simple-select-statement-question/#findComment-398631 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.