ShoeLace1291 Posted September 16, 2010 Share Posted September 16, 2010 I have a table called "events" that I want to gather data from. The events that I want are ones that haven't happend yet. There is a column for date that contains the unix timestamp string. How would I select the rows with dates greater than the current date? Link to comment https://forums.phpfreaks.com/topic/213564-mysql-select-by-time-difference/ Share on other sites More sharing options...
s0c0 Posted September 16, 2010 Share Posted September 16, 2010 Try SELECT * FROM events WHERE event_date > CURRENT_DATE() This is a very basic question, you should really go grab a book on PHP/MySQL if you're going to be programming a lot. *edit* I just noticed you're using a unixtimestamp. You'll need to look up how to convert the current_date into a unixtimestamp. There should be a mysql function that does this, you can use PHP as well. Beyond that the SQL I gave you will work, just figure it out. Link to comment https://forums.phpfreaks.com/topic/213564-mysql-select-by-time-difference/#findComment-1111761 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.