pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tommy Gildseth <tommy@gildseth.com>
To: Karthikeyan Sundaram <skarthi98@hotmail.com>
Cc: postgres sql <pgsql-sql@postgresql.org>
Cc: pgsql-php-owner@postgresql.org
Subject: Re: quesion on functions calling from php
Date: Tue, 17 Apr 2007 08:08:29 +0200
Message-ID: <4624645D.70002@gildseth.com> (raw)
In-Reply-To: <BAY131-W2B7152A114EF6B370FCBFB0520@phx.gbl>
References: <BAY131-W2B7152A114EF6B370FCBFB0520@phx.gbl>

Karthikeyan Sundaram wrote:
> Hi,
>  
>    I have written a plpgsql function media_format_func(p_in 
> overlay_format_type) which returns int
>  
> $sql='select * from 
> media_format_func((200,400,'640*481','jpg')::overlay_format_type)';
>  
> $result = $this->objDB->query($sql);
> print_r($result,1);
>  
>   I should get a value as 10, instead I am getting the Resource ID as 
> 128 which is wrong I guess I am getting the output as an object and I 
> am not getting the expected resul that I should get. 

Try one of the methods $this->objDB->getRow($sql), 
$this->objDB->getAll($sql) or $this->objDB->getOne($sql) instead.
Also, have a look at the documentation at pear.php.net

-- 
Tommy
www.gildseth.com




view thread (2+ messages)

Message-ID: <4624645D.70002@gildseth.com>
Permalink:  ../4624645D.70002@gildseth.com/
Also on:    postgresql.org/message-id/4624645D.70002@gildseth.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tommy@gildseth.com, skarthi98@hotmail.com, pgsql-php-owner@postgresql.org
  Subject: Re: quesion on functions calling from php
  In-Reply-To: <4624645D.70002@gildseth.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