How can i find second largest number in case i dont find the number i’ve searched?
for example
i am searching 3000 and on my db the largest number i’ve got is 2900 how can i find the second largest?
PHP Code:
$query = $select->from('numbers', array(
'id'))
->where('number=?',$big_number);
Try with
<=instead of=Orderthe resultset descending by the number, thenlimitthe resultset to 1 row……