Re: timezone

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: angelo(dot)rigo(at)globo(dot)com
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: timezone
Date: 2002-08-01 19:09:19
Message-ID: 200208011209.19576.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Angelo,

> how can i display 20 results at a time and give a link to the next 20 or
> 50 or whatever records i do have on the database?

Use LIMIT and OFFSET, which work the same in Postgres and MySQL:

SELECT nome, to_char(data, 'DD.MM.YYYY') AS data
FROM aprovados
ORDER BY nome ASC
LIMIT 20 OFFSET 0;

then

SELECT nome, to_char(data, 'DD.MM.YYYY') AS data
FROM aprovados
ORDER BY nome ASC
LIMIT 20 OFFSET 20;

etc.

--
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

Responses

Browse pgsql-php by date

  From Date Subject
Next Message angelo.rigo 2002-08-01 19:48:03 Re: timezone
Previous Message Josh Berkus 2002-08-01 18:44:52 Re: timezone