I'm running the following code on my database,
its to hopefully show results that are.
Basically New listings, but if today has past not to be listed.
1. So New listings no older than 14 days.
2. If the New listing is older than today dont show.
cal -stamp = Date Entered.
cal_event = Event date
In laymans terms i'm trying to result a query like this,
Find all (cal-stamp) records that are not older than 14days
BUT...... out of those results,
if (cal_event) is older than today then dont show.
$query =( "SELECT 'cal_stamp' ,`cal_event` , `cal_cat` , `cal_desc` , `cal_link` FROM `calendar` WHERE `cal_stamp` <= '$days14' AND `cal_event` >= '$today' ORDER BY `cal_event` ASC ");
I found this snipit to work the date + 14days
and the todays date.
(they do run in my code above my sql and seem to be doing the job.
$days14 = strftime ("%Y-%m-%d", strtotime("+14 day")); $today= strftime ("%Y-%m-%d");
Can anyone help?
i need to resolve the between dates i think?
Help or guidence apreciated thanks mark.