Re: Pagenation Set up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In message <46450.39549.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Gab Teo
<doneatlast1000@xxxxxxxxx> writes
>The script is returning every data on the recordset even while I set the limit 
>to a limit of 10 as in ($rowsperpage = 10;)

But, as everyone seems to be saying, you set the variables

>> {$pagenum=$_POST[page];}
>> $rowsperpage = 10;
>> $offset=($pagenum-1)*$rowsperpage;
>>
>> $numrows=$row[numrows];
>> $maxPage=ceil($numrows/$rowsperpage);

but you don't use them

>> $sql=mysql_query("select *   from selling where product like '$trimmed%' or
>> description like '$trimmed%' or price like '$trimmed%' or info like
>> '$trimmed%' or contactseller like '$trimmed%' order by id DESC ");

"... order by id DESC LIMIT $offset, $rowsperpage";


-- 
Pete Clark

Hot Costa - Local Spain
http://www.hotcosta.com

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux