ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-db
php-db
Re: [PHP-DB] Limited number of database results
by John Meyer other posts by this author
Dec 13 2006 2:53PM messages near this date
Re: [PHP-DB] Limited number of database results | RE: [PHP-DB] Limited number of database results
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
Thread:
Chris Carter
Niel Archer
John Meyer
Bastien Koert

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved