Link to home
Start Free TrialLog in
Avatar of RVASANTH
RVASANTH

asked on

How to show limited records (rows)per page using php and html

Hi,

 I am using PHP to get records from mysql and showing in html page. i want to restrict 10 records per page. i.e in the end of the html table i need to provide a button and the html should display only 10 record per page. if the user clicks 'button' then i have to show the next 10 records.

Can any one help me to do this..
Avatar of Joseph Melnick
Joseph Melnick
Flag of Canada image

Hello  RVASANTH,

In order to collect 10 records at a time from mysql:

select columns from tablename where condition = true LIMIT start, pagesize

usual process is:

connect to mysql
select db
execute query against mysql
iterate over resulting record set
  build record from resulting row from db
end
echo resulting record to screen

Joseph Melnick
 



ASKER CERTIFIED SOLUTION
Avatar of h23
h23

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial