skyrice Posted January 30, 2007 Share Posted January 30, 2007 Hi there. I have a table that lists events along with their start time in a DATETIME field and their duration in two INT fields, one for hours and one for minutes. I'm trying to SELECT any events in this table that are happening in the future or are currently in progress. What I'm trying to do makes more sense if you look at this SQL query I'm making, but it doesn't work because it's not correct. How can I reform this query to do what I need? Thanks in advance.SELECT * FROM eventsWHERE date >= NOW() + INTERVAL events.hours HOUR + INVERVAL events.minutes MINUTE; Link to comment https://forums.phpfreaks.com/topic/36388-mysql-select-using-interval/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.