Re: Limited number of database results

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

 



Niel Archer wrote:
> Hi
> 
> use a LIMIT clause in your SQL.  Something like:
> 
> $query="SELECT * FROM xxxx WHERE hello = '$hello' LIMIT " . ($page - 1) *
> $rows . ", $rows";
> 
> then you only need specify the logic to set the page, row and
> limitations
> 
>

You also typically need to use the mod operand as well to create the
"1", 2, 3, pages.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux