Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
shiranwas
Forum Commoner
Posts: 53 Joined: Fri Jul 07, 2006 10:41 pm
Location: Colombo
Post
by shiranwas » Thu Aug 17, 2006 4:26 am
hi,
I am having a problam with my displaying the records. i.e when i query a table it gives me all the records that matches my criterias but i want to show only 10 records in first pager and so on how to do this
please help me
shiran
JayBird
Admin
Posts: 4524 Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:
Post
by JayBird » Thu Aug 17, 2006 4:26 am
put
at the end of your query
Oren
DevNet Resident
Posts: 1640 Joined: Fri Apr 07, 2006 5:13 am
Location: Israel
Post
by Oren » Thu Aug 17, 2006 4:36 am
Actually, you will need to use this for the first page:
Second page:
Third page:
And so on...
shiranwas
Forum Commoner
Posts: 53 Joined: Fri Jul 07, 2006 10:41 pm
Location: Colombo
Post
by shiranwas » Thu Aug 17, 2006 4:41 am
hi,
yes i did that but the thing is when i go to the next page i put limit 10 offset 10, and how do i go to previous
first page
select * from tblComplaints limit 10;
second and 3 ......
select * from tblComplaints limit 10 offset 10;
but how to go back to from 2nd page to first page
Oren
DevNet Resident
Posts: 1640 Joined: Fri Apr 07, 2006 5:13 am
Location: Israel
Post
by Oren » Thu Aug 17, 2006 4:42 am
I don't understand what you mean
shiranwas
Forum Commoner
Posts: 53 Joined: Fri Jul 07, 2006 10:41 pm
Location: Colombo
Post
by shiranwas » Thu Aug 17, 2006 5:05 am
Oren,
i am very sorry i did not see your answer before i send earlier meaasage
what you sent is correct and working as the way i want.
thank you
Oren
DevNet Resident
Posts: 1640 Joined: Fri Apr 07, 2006 5:13 am
Location: Israel
Post
by Oren » Thu Aug 17, 2006 5:07 am
Cool
Jenk
DevNet Master
Posts: 3587 Joined: Mon Sep 19, 2005 6:24 am
Location: London
Post
by Jenk » Thu Aug 17, 2006 5:48 am
If you still have problems, search the forum for 'pagination'
should be plenty of topics to help you along