You'll want to use the LIMIT option in SQL. So on the end of your query add:
"LIMIT 0,10" to get the first ten results.
The first number is the "offset", and the last is the max amount to
retrieve. To get links 20 through 40 you'd use:
"LIMIT 19, 39"
The offset is refering to an array, so offs
On 21 Apr 2001 19:26:03 -0700, McShen <[EMAIL PROTECTED]> wrote:
>then, should i do this?
>---
>$query = "SELECT * FROM refer ORDER BY hits desc LIMIT $i,$end";
Is $end set at this point? Also, if you always want to display 15 records, this
could just be LIMIT $i, 15.
--
PHP General Mailing Li
then, should i do this?
---
$query = "SELECT * FROM refer ORDER BY hits desc LIMIT $i,$end";
$result = mysql_db_query ("celebzone", $query);
$num = mysql_num_rows($result);
echo $num;
for ($i; $i < $end; $i++)
{
$r = mysql_fetch_array($result,$i);
$id = $r[id];
$title = $r[title
3 matches
Mail list logo