In article <9btgks$fc6$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("McShen") wrote:
> $start is passed by the url. like http://mydomain.com/links.ph?start=0;
> $end =$start+15;
>
> $query = "SELECT * FROM refer ORDER BY hits desc LIMIT $start,$end";
>
> it didn't work. Please help.
Perhaps if you were more specific about what you were expecting to happen
and what *actually happened when "it didn't work"...? Meantime note that
the 2nd parameter to LIMIT is not an end point but a count of total rows to
be shown. So "limit 0,15" translates to "show the first 15 rows" while
"limit 15,15" and "limit 30,15" would be the correct way to get the next
two groups of 15 rows each.
--
CC
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]