pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alan Hodgson <ahodgson@simkin.ca>
To: pgsql-php@postgresql.org
Subject: Re: Retrieving result of COUNT(*) with PHP
Date: Wed, 28 Mar 2007 14:43:05 -0700
Message-ID: <200703281443.05137@hal.medialogik.com> (raw)
In-Reply-To: <6b8c0db0703281431m4b14237es333e1d6152f124de@mail.gmail.com>
References: <C2303737.4AFAD%lynna@spidersilk.net>
	<20070329000511.qidyijwozuo0w0w4@imp3.uta.fi>
	<6b8c0db0703281431m4b14237es333e1d6152f124de@mail.gmail.com>

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 




view thread (15+ messages)  latest in thread

Message-ID: <200703281443.05137@hal.medialogik.com>
Permalink:  ../200703281443.05137@hal.medialogik.com/
Also on:    postgresql.org/message-id/200703281443.05137@hal.medialogik.com

 · 

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: ahodgson@simkin.ca
  Subject: Re: Retrieving result of COUNT(*) with PHP
  In-Reply-To: <200703281443.05137@hal.medialogik.com>
  References: <C2303737.4AFAD%lynna@spidersilk.net> <20070329000511.qidyijwozuo0w0w4@imp3.uta.fi> <6b8c0db0703281431m4b14237es333e1d6152f124de@mail.gmail.com> <200703281443.05137@hal.medialogik.com>

* 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