I want to write a query to find all the items in my 'schedule_items' table that match a YYYY-MM-DD value of a DATETIME field.
something like: SELECT * FROMschedule_itemsWHEREstart?matches? '$date'
Where start would be a DATETIME field with data like 2009-09-23 11:34:00 and $date would be something like 2009-09-23
Can I do this or do I need to load all the values and then explode and compare the values in my DATETIME start field?
You can use LIKE in MySQL
You put a % sign as a wildcard.
Be aware though that like can be a very heavy query. Specially if you use % at the start of a string.