Re: what's wrong with this?
| From: | CC Zona | Date: | Sun, 22 Apr 2001 05:56:21 +0000 |
| Subject: | Re: what's wrong with this? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49723@lists.php.net to get a copy of this message | ||
In article <9btgks$fc6$1@toye.p.sourceforge.net>,
webmaster@celebritieszones.com ("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