Received: from mail.visgen.com (uu-t1-6.visgen.com [216.94.71.6]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1JLhYx00246 for ; Mon, 19 Feb 2001 16:43:34 -0500 (EST) (envelope-from dorin@visgen.com) Received: from dorin (bay-auto-121 [10.1.18.121]) by mail.visgen.com (8.9.3/8.9.3) with ESMTP id QAA19926; Mon, 19 Feb 2001 16:43:32 -0500 (EST) Message-Id: <4.2.0.58.20010219163937.00ac95f0@pophost> X-Sender: dorin@pophost X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Mon, 19 Feb 2001 16:41:52 -0600 To: herbie@nextearth.com, pgsql-php From: Dorin Grunberg Subject: Re: Rows in tables... In-Reply-To: <3A9192B7.EF0D1A2B@nextearth.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200102/24 X-Sequence-Number: 163 Use: pg_NumRows($result) and $result = pg_Exec ($conn, $sql); All the best, Dorin Grunberg At 04:40 PM 2/19/2001 -0500, Herb Pabst wrote: >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