Reputation: 5433
I've a announcement table with the structure,
Msgid int,
title varchar(150)
message text
date_from datetime
date_to datetime
I've want to list all the announcements which will be due today (i.e) announcements of which today's date falls b/w date_from and date_to.
any ideas?
Upvotes: 6
Views: 16918
Reputation: 21553
SELECT title, message
FROM announcements
WHERE NOW() BETWEEN date_from AND date_to
Upvotes: 0