Page 1 of 1

MYSQL QUERY SYNTAX?

Posted: Mon Oct 12, 2009 12:41 am
by robertbarzyk
$result = mysql_query("SELECT * FROM yesterday ORDER BY points DESC LIMIT 0,5") ;

what i want to do is skip the first 5 rows
and get the second 5 rowes (rows 6-10)
know any ways of doing this ?

Re: MYSQL QUERY SYNTAX?

Posted: Mon Oct 12, 2009 1:25 am
by jegan.aaodis
Hi,

Use thsi query

$result = mysql_query("SELECT * FROM yesterday ORDER BY points DESC LIMIT 5,5") ;

The First five is used to get the records from ie 6,7,8,9,10..etc..,
The next five is to send the total records to show after 6.
I Hope this helps you.

Thanks