--- Matthew Hackett <[EMAIL PROTECTED]> wrote:

> i know this is a php / mysql list but i'm coming to the end of my
> tether!
> 
> Anyone have any ideas or code snippets for Pagination (i.e. < PREV 1 2 3
> 4 NEXT > ) when using a query on an MS SQL database?

Without knowing any real specifics about MSSQL, I can tell you that this
sort of thing is typically accomplished on MySQL systems using queries
that include the LIMIT clause.

SELECT * FROM tbl_name WHERE col=value LIMIT 5,10

This gets all information from the table tbl_name where the column named
'col' has a value of 'value', starting at the 6th row (5 is row six, the
numbering starts at 0) and returns 10 rows.

So, you would just need to change the numbers in the LIMIT clause to
create the links for "PREV", "1", etc.



Michael Roush
[EMAIL PROTECTED]

"The power of the Web is in its universality. Access by everyone regardless of 
disability is an essential aspect." 
-- Tim Berners-Lee, W3C Director and inventor of the World Wide Web


        
                
______________________________________________________ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/ 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/CefplB/TM
--------------------------------------------------------------------~-> 

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




Reply via email to