$array=array(1,3,4,20,55,88,125,1000); $string=implode(',',$array); $init=8; $mysqli->query("SELECT * FROM tbl WHERE set='$init' AND status IN ($string) LIMIT 2"); Is it possible to skip lines in the case of the already existing occurrence of a certain value? That is, if the first line
id=1 set=8 status=1 second
id=2 set=8 status=1 and the third
id=3 set=8 status=3 , is it possible to somehow modify the request to get records with id = 1 and id = 3?