| From: | "Mitch Vincent" <mitch(at)venux(dot)net> |
|---|---|
| To: | <herbie(at)nextearth(dot)com>, "pgsql-php" <pgsql-php(at)postgresql(dot)org> |
| Subject: | Re: Rows in tables... |
| Date: | 2001-02-19 21:44:36 |
| Message-ID: | 03b401c09abd$27d60dd0$0200000a@windows |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-php |
SELECT count(*) FROM <tablename>
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" <herbie(at)nextearth(dot)com>
To: "pgsql-php" <pgsql-php(at)postgresql(dot)org>
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
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dorin Grunberg | 2001-02-19 22:41:52 | Re: Rows in tables... |
| Previous Message | Herb Pabst | 2001-02-19 21:40:09 | Rows in tables... |