how can i write a sql like this?
$sqlNext = "select * from table WHERE (status='normal') AND (number = (select max(number) from table where number < 5)) LIMIT 1";
in first step filter the result by status
column, after that
search in rows with number
value less than 5 in status='normal'
rows.
in this sql first part of AND
=>status='normal'
IS NOT WORK
just send me max row with number
value less than 5