Menu
this does work the datefiff is not doing what is should, no values are being returned regardless of the value set for > 20
[code=php]
$query_get_newest_ad = (“SELECT ad_date, title, ad_id, member_id, description FROM ads WHERE (DATEDIFF(CURDATE(), ad_date) > 20) OR status != ‘Delete’ ORDER by ad_date DESC Limit 2”);
this does work ?
[code=php]
$query_get_expired_ads = (“SELECT * FROM ads WHERE DATEDIFF(CURDATE(), ad_date) > ’20′”);