Hi there folks!
Here's my query as it stands:
$sql1="SELECT *, DATE_format(create_date, '%b %e, %Y, %l:%i%p') as create_date, DATE_format(end_date, '%b %e, %Y, %l:%i%p') as end_date FROM notifications_notifications WHERE active = 1 AND end_date > NOW() ORDER BY id DESC";
but I need to alter it to only make sure end_date is greater than now if type is 3, so to be clearer:
$sql1="SELECT *, DATE_format(create_date, '%b %e, %Y, %l:%i%p') as create_date, DATE_format(end_date, '%b %e, %Y, %l:%i%p') as end_date FROM notifications_notifications WHERE active = 1(only do this if type = 1(AND end_date > NOW())) ORDER BY id DESC";
but I can't figure out how to make this happen. Could someone clue me in?
Thanks for your time!