Re: Retrieving result of COUNT(*) with PHP - Mailing list pgsql-php

From Alan Hodgson
Subject Re: Retrieving result of COUNT(*) with PHP
Date
Msg-id 200703281443.05137@hal.medialogik.com
Whole thread Raw
In response to Re: Retrieving result of COUNT(*) with PHP  ("Valentín Orfila" <valentinorfila@gmail.com>)
List pgsql-php
On Wednesday 28 March 2007 14:31, "Valentín Orfila"
<valentinorfila@gmail.com> wrote:
> Where people this the way I do, count (*) could be slower
>
> <?
> $sql = "select * from TableName";
> $count = pg_query($sql);
> $count = pg_num_rows($count);
> ?>
> <td ><?=$count?></td>
>
> I thing that's enough :)

Apparently you have no tables with any real amount of data in them.

--
"It is a besetting vice of democracies to substitute public opinion for
law." - James Fenimore Cooper


pgsql-php by date:

Previous
From: "Gavin M. Roy"
Date:
Subject: Re: Retrieving result of COUNT(*) with PHP
Next
From: Lynna Landstreet
Date:
Subject: Re: Retrieving result of COUNT(*) with PHP