Connecting Tech Pros Worldwide Forums | Help | Site Map

pages with php

pradeepjain's Avatar
Needs Regular Fix
 
Join Date: Jul 2007
Location: India
Posts: 407
#1: Mar 13 '08
I am using mysql database and retriving data from table using php. I have 20 or more entries in table and i want to display only 1st 10 entries in 1st page and a small next button at the bottom so tht when i click on tht i display page with next 10 entries ans so on pages. plzz give me some suggestions on how to do this.

Thanks,
Pradeep

rpnew's Avatar
Familiar Sight
 
Join Date: Aug 2007
Posts: 180
#2: Mar 13 '08

re: pages with php


Quote:

Originally Posted by pradeepjain

I am using mysql database and retriving data from table using php. I have 20 or more entries in table and i want to display only 1st 10 entries in 1st page and a small next button at the bottom so tht when i click on tht i display page with next 10 entries ans so on pages. plzz give me some suggestions on how to do this.

Thanks,
Pradeep

Hi,

You can start with following query example..
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM `your_table` LIMIT 0, 10;
  2.  
This query will fetch you first 10 rows from your table...
Then play a bit with your PHP code to get what you want...

Regards,
RP
Reply