pagination problem in postgresql need help

From: hatem gamal elzanaty <hatem(at)softpro(dot)bz>
To: pgsql-sql(at)postgresql(dot)org
Subject: pagination problem in postgresql need help
Date: 2011-06-17 22:43:44
Message-ID: 4DFBD8A0.9000503@softpro.bz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

hi,
please see this code

select aiah_number.aiah_number_id, aiah_number.aiah_number,
lock.lock_status, rank.rank_value, approve.approve_status, lock.view
from aiah_number inner join lock on aiah_number.locked = lock.lock_id
inner join rank on aiah_number.rank = rank.rank_id inner join approve on
aiah_number.approve = approve.approve_id order by rank_value desc limit
1 offset 0;

and this code

select aiah_number.aiah_number_id, aiah_number.aiah_number,
lock.lock_status, rank.rank_value, approve.approve_status, lock.view
from aiah_number inner join lock on aiah_number.locked = lock.lock_id
inner join rank on aiah_number.rank = rank.rank_id inner join approve on
aiah_number.approve = approve.approve_id order by rank_value desc limit
1 offset 1;

suppose i have 200 hundred record and i want to display records in pages
one record per page i'm facing a problem even if i'm running the script
through phppgadmin it's only display the first record in the page only
no more no less in the php code it display record 1 and records byound
180 and so on

can you help in that issue ?

thanks in advance

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tripura 2011-06-18 00:20:23 Append n Rows into a Single Row
Previous Message Viktor Bojović 2011-06-16 22:08:56 Re: Sqlite to postgres database conversion.swedish chararacter issue