Answer the question
In order to leave comments, you need to log in
How to make a limit not from the beginning?
$result = mysql_query("SELECT * FROM ads WHERE balans >= for_one and user != '$user' and type = '$ads_jobs' ORDER BY for_one DESC",$db); //Вытаскиваем из таблицы 5 комментариев начиная с $num
if(mysql_num_rows($result) > 0){
while($qwe = mysql_fetch_array($result)){
$num = mysql_num_rows(mysql_query("SELECT id FROM ads_views WHERE user = '$user' and ad_id = '$qwe[link_id]'",$db));
if($num==0){
Answer the question
In order to leave comments, you need to log in
I seem to be able to :
To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. This statement retrieves all rows from the 96th row to the last:SELECT * FROM tbl LIMIT 95,18446744073709551615;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question