View Single Post
Old 11-14-2012, 04:46 PM   PM User | #4
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
It's slightly confusing as your code refers to 'week_special_rate' but the field in your table is named 'special_offer'..

Anyway, I believe you need a query like:

SELECT special_offer FROM yourtable WHERE `date` > NOW()
or
SELECT special_offer FROM yourtable WHERE `date` > NOW() and special_offer > 0

It might be more complicated if your 'date' field is a string.

BTW (Personally) I wouldn't use 'date' as a field-name - it can only lead to trouble or confusion later
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 11-14-2012 at 04:50 PM..
AndrewGSW is offline   Reply With Quote