Received: from mail3.mx.voyager.net (mail3.mx.voyager.net [216.93.66.202]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1JLjRx01235 for ; Mon, 19 Feb 2001 16:45:27 -0500 (EST) (envelope-from mitch@venux.net) Received: from windows (mdmmi052194.voyager.net [216.93.52.194] (may be forged)) by mail3.mx.voyager.net (8.10.2/8.10.2) with SMTP id f1JLjO119757; Mon, 19 Feb 2001 16:45:24 -0500 (EST) Message-ID: <03b401c09abd$27d60dd0$0200000a@windows> From: "Mitch Vincent" To: , "pgsql-php" References: <3A9192B7.EF0D1A2B@nextearth.com> Subject: Re: Rows in tables... Date: Mon, 19 Feb 2001 16:44:36 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200102/25 X-Sequence-Number: 164 SELECT count(*) FROM Then get the count result. You can count a single value in the table if you want to also.. -Mitch ----- Original Message ----- From: "Herb Pabst" To: "pgsql-php" Sent: Monday, February 19, 2001 4:40 PM Subject: [PHP] Rows in tables... > What is the easiest way to get the total number of > rows in a table? I want to do a random pick from a > table and need to know how many rows are in the > table. > > Do I do a "SELECT * FROM table" and use the info > from this, or will a select return all the data? > This is where I'm hazy. Or does fetch_row actually > return the data? > > Any help is appreciated, > Herbie Pabst > >