date - sub query causing issue with INTERVAL 90 DAY -
$query = mysqli_query($connect,"select * `posts` `name` '%$search%' or (number in ( select number `posts` `name` '%$search%' , `number` !='') ) order date asc limit 100");
where should plug in line? haven't been able work above query. thx.
&& date>=date_sub(curdate(), interval 90 day)
(all rows returned must interval 90 day...including subquery part)
$query = mysqli_query($connect,"select * `posts` `name` 'adam' && date>=date_sub(curdate(), interval 90 day) or (number in ( select number `posts` `name` 'adam' , `number` !='') )
this not return results if adam row older 90 days. however, when adam row less 90 days, results subquery rows can expired.
so tried still bypassing date check subquery:
$query = mysqli_query($connect,"select * `posts` `name` 'adam' && date>=date_sub(curdate(), interval 90 day) or (number in ( select number `posts` `name` 'adam' , `number` !='' && date>=date_sub(curdate(), interval 90 day) ) )
Comments
Post a Comment