Looking for the best way to see all events in the table with a date greater than today’s date. I had a hack of it working until the year changed, now it doesn’t work. I’m using the format m/d/y when inserting into the table. I tried ordering by date, then showing the most recent 5 or so with out showing older than today, and that was kind of a pain in the ass and even now, it doesn’t work any more. Any help would be appreciated.
SELECT * FROM Events WHERE your_date > CURRENT_DATE
if you need to grab all the info or atleast most if from a row, then by all means. but if you’re grabbing everything from your event row and you only need to display the title, its unnecessary cpu power you’re wasting. this can become problematic if you have hundreds or thousands of requests at the same time.
Sorry, forgot to post in here, I got it to work by doing where date >= now()
Using the std "seconds since epoch" would have made this easier, no??
wait, what is the type for your date field? will MySQL recognize m/d/y as a date?