adman4054 Posted October 20, 2012 Share Posted October 20, 2012 Looking for a little help, in addition to -- where display = 1 and approved = 1, I want to add another -- If the expires date is today or any date in the future I want to show the item. if (count($where) >= 1) { $where[] = 'display = 1'; $where[] = 'approved = 1'; $where_clause = implode(' AND ', $where); } else { $where_clause = ' false'; } $listings_query = mysql_query(" SELECT * FROM wholesale WHERE $where_clause ORDER BY showlogo DESC ") or die(mysql_error()); Thanks in advance!! Quote Link to comment https://forums.phpfreaks.com/topic/269720-help-adding-another-where-clause/ Share on other sites More sharing options...
Barand Posted October 20, 2012 Share Posted October 20, 2012 the condition you want is $where[] = "expires >= CURDATE()" Quote Link to comment https://forums.phpfreaks.com/topic/269720-help-adding-another-where-clause/#findComment-1386612 Share on other sites More sharing options...
adman4054 Posted October 20, 2012 Author Share Posted October 20, 2012 the condition you want is $where[] = "expires >= CURDATE()" Thank You! Quote Link to comment https://forums.phpfreaks.com/topic/269720-help-adding-another-where-clause/#findComment-1386641 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.