Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 50847475D7E for ; Thu, 1 Aug 2002 15:08:35 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1597568; Thu, 01 Aug 2002 12:08:34 -0700 Content-Type: text/plain; charset="iso-8859-15" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: angelo.rigo@globo.com Subject: Re: timezone Date: Thu, 1 Aug 2002 12:09:19 -0700 X-Mailer: KMail [version 1.4] References: <3D3EEC5F00026068@riosf05.globoi.com> In-Reply-To: <3D3EEC5F00026068@riosf05.globoi.com> Cc: pgsql-php@postgresql.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200208011209.19576.josh@agliodbs.com> X-Archive-Number: 200208/4 X-Sequence-Number: 1349 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. --=20 -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco