constraints - MYSQL UNIQUE for date part of a date field -
i have field sync_date
(type datetime) in table visit
. sync_date
can not repeat in same day. so, have idea have sync_date
unique field. doesn't work case because don't want takes account hour part.
for example
today can have this:
sync_date
= '2013-05-14 08:45:00'
today mysql shouldn't admit same '2013-05-14' anymore tomorrow can happens.
Comments
Post a Comment