SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: Expired Date?
-
Apr 5, 2005, 01:33 #1
- Join Date
- Feb 2005
- Posts
- 737
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Expired Date?
Hi Guys,
Wondering if you could help. I have set up a php admin section where you can add ‘events’ into a MySql database and then created a page where all records saved are then pulled out of that database in DATE order on my php template page.
Now this works fine, but I was wondering if anyone knew of a clever bit of php code which I can put on the page that pulls out the data which somehow looks at the current date and if there is an ‘Event’ that has expied and happened the page will not show it?
Many Thanks
Chris
-
Apr 5, 2005, 03:26 #2
- Join Date
- Feb 2004
- Location
- Örebro, Sweden
- Posts
- 2,716
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
You should be able to filter out expired dates in your SQL query:
Code:SELECT * FROM your_table WHERE date_field >= CURDATE()
ERIK RIKLUND :: Yes, I've been gone quite a while.
Bookmarks