I have a Db query which should return value:
$gbe=mysql_query("SELECT userid FROM `gift_stage` WHERE amount='500' AND (`assign` > '1' AND `assign` < '18') AND userid !='".$class_session->isuser()."' ORDER BY id ASC LIMIT 1");
but it is not showing any value, but when I replace AND (
assign> '1' AND
assign< '18')
with AND (
assign> '1')
it is giving the expected result. But I am not getting that where is the problem, because the field assign
alread have the value '13' in database
please help me guys
all fields are varchar