Re: PHP + APACHE + POSTGRES

From: "wilhelmtg(at)cantv(dot)net" <wilhelmtg(at)cantv(dot)net>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: PHP + APACHE + POSTGRES
Date: 2004-06-04 22:49:24
Message-ID: 1830-22004654224924536@cantv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

$query = "SELECT * FROM tbl";
$result = pg_exec($query);
$totalrows = pg_numrows($result);
echo $totalrows;

Forma correcta.

Saludos



----------- Mensaje Original --------------

De: Alvaro Herrera [alvherre(at)dcc(dot)uchile(dot)cl]
Para: Joel A. Iturra [pgsql(at)iturra(dot)cl]
Cc: pgsql-es-ayuda(at)postgresql(dot)org [pgsql-es-ayuda(at)postgresql(dot)org]
Asunto: Re: [pgsql-es-ayuda] PHP + APACHE + POSTGRES
Fecha: 03/06/2004 19:34:41
Mensaje:


On Thu, Jun 03, 2004 at 06:23:19PM -0400, Joel A. Iturra wrote:
> On Thursday 03 June 2004 16:45, you wrote:
> > On Wed, Mar 17, 2004 at 05:32:17PM +0100, Gorka wrote:
> > > No, perdona, ... es que yo creo que dice que no tiene soporte, porque
en
> > >
> > > realidad esto es una tabla tal que así:
> > > |PostgreSQL Support |enabled
> >
> > Yo diria que si. No uses pg_query(), usa pg_exec().
>
> Note: This function used to be called pg_exec(). pg_exec() is still
available
> for compatibility reasons but users are encouraged to use the newer name.

Duh!!!

> ya me preguntaba yo pq no aparecia la funcion esa en el manual.
> me imagino que tu recomendacion se debe a un problema que ya no existe,
cual
> era ???

El problema era que PHP le tiraba "pg_query() function does not exist" o
algo por el estilo ... pero segun phpinfo() aparentemente el soporte de
Postgres esta activado.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Al principio era UNIX, y UNIX habló y dijo: "Hello world\n".
No dijo "Hello New Jersey\n", ni "Hello USA\n".

---------------------------(end of broadcast)---------------------------
TIP 2: puedes desuscribirte de todas las listas simultáneamente
(envíe "unregister SuDirecciónDeCorreo" a majordomo(at)postgresql(dot)org)

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Mauricio Ferrari 2004-06-04 23:17:58 Re: pg_dump pg_dumpall pg_restore
Previous Message Alvaro Herrera 2004-06-04 20:36:16 Re: consulta bytea