I have a timestamp field [SubmissionDate], which defaults to current_timestamp, and i was wondering how do i query my database in such a fashion that for example i get only shown all entries submitted on a certain year and month?
Something like:
SELECT * FROM DNA_entrys
WHERE `SubmissionDate`.month = February
AND `SubmissionDate`.year = 2004
Should be an elementary operation but i couldn’t find a quick answer on that
tho i suggest:
latter allows use of indexes, which makes query faster if you have ithat field indexed.