Hi Lawrence,

I'm assuming you are pulling these products from a mysql db. If so you can
use the LIMIT clause. 

$sql = "SELECT * FROM table LIMIT 1, 10"; //where these integers represent
row_count, OFFSET
Read more here http://www.mysql.com/doc/en/SELECT.html

You can substitute a variable for the row_count so that you can page back
and forth via get vars.
$sql = "SELECT * FROM table LIMIT ".$startat.", 10";

If you are pulling from MSSQL then there is no limit functionality and you
have to code the offset yourself. This is a pain and I don't have that chunk
of code on hand right now. Maybe someone else does...

Dan

-----Original Message-----
From: Lawrence [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 27, 2003 8:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Code to splite page


I need the code to splite page , I have 50 products , I want splite 10
products per page , if anyone has that , please show me , thank you

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

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

Reply via email to