Thread: Calling Stored Procedures from PHP

Calling Stored Procedures from PHP

From
"Cima"
Date:
hi,
 
how do i call a stored procedure i have in postgresql 8.0.1 from  php with the necesary parameters or variables?
 
 
thanx.

Re: Calling Stored Procedures from PHP

From
John DeSoi
Date:
On Mar 29, 2005, at 3:48 PM, Cima wrote:

>
> how do i call a stored procedure i have in postgresql 8.0.1 from  php
> with the necesary parameters or variables?


You don't say want php interface you are using, but with the standard
pgsql interface included with php it might look something like this:

$x = 3;
$result = pg_query($conn, "select myprocedure(1, 2, $x);");
$rows = pg_fetch_all($result);


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: [despammed] Calling Stored Procedures from PHP

From
Andreas Kretschmer
Date:
am  29.03.2005, um 12:48:04 -0800 mailte Cima folgendes:
> hi,
>
> how do i call a stored procedure i have in postgresql 8.0.1 from  php
> with the necesary parameters or variables?
>

In the same way like other procedures.

Regards, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===