pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dorin Grunberg <dorin@visgen.com>
To: herbie@nextearth.com, pgsql-php <pgsql-php@postgresql.org>
Subject: Re: Rows in tables...
Date: Mon, 19 Feb 2001 16:41:52 -0600
Message-ID: <4.2.0.58.20010219163937.00ac95f0@pophost> (raw)
In-Reply-To: <3A9192B7.EF0D1A2B@nextearth.com>

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




view thread (4+ messages)  latest in thread

Message-ID: <4.2.0.58.20010219163937.00ac95f0@pophost>
Permalink:  ../4.2.0.58.20010219163937.00ac95f0@pophost/
Also on:    postgresql.org/message-id/4.2.0.58.20010219163937.00ac95f0@pophost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: dorin@visgen.com
  Subject: Re: Rows in tables...
  In-Reply-To: <4.2.0.58.20010219163937.00ac95f0@pophost>
  References: <3A9192B7.EF0D1A2B@nextearth.com> <4.2.0.58.20010219163937.00ac95f0@pophost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox