php - mysql query AND with OR not work -
in query want write logic , operation or . query not work.
select * `data` `city`='mycity' , performdate='4' , (curtime() >= `valid_from` or curtime() <= `valid_to`) , perform_type='ptype'
i think
(curtime() >= `valid_from` or curtime() <= `valid_to`)
this logic not work
untested ---
$time = curtime(); select * data city = 'mycity' , performdate = '4' , perform_type = 'ptype' , ($time >= 'valid_from' or $time <= 'valid to');
Comments
Post a Comment