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
hi
I have 30 links stored in a table(mysql) now. I wanna show them accorging to
the traffic they send. But i don't want to list all of them in just 1 page
because i will be adding 300 links soon. (I don't want my visitors to wait 3
minutes to load the links)How should i do it? I wanna do it like
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
4 matches
Mail list logo