Hello
I have a database with some records, these records have been inserted with a datetime (ex:20070214202701 ). I wish that the user can search for records for a given time or hour for all dates/hours that are in the table. Even for times where there are no records in the table, so it should be possible for the user to search for all hours/dates from the first entry to todays date. Are there some good calendars where this can be done, or does someone have some other example with for instance dropdowns using php?
Darla
Calendar/dropdown for given set of dates/time
Moderator: General Moderators
You can use regex in mysql queries:
To search for all dates/times that are in the 8pm hour.
Code: Select all
SELECT * FROM `table` WHERE `datetime` REGEXP '^\d{8}20\d{4}$'