Re: quesion on functions calling from php

From: Tommy Gildseth <tommy(at)gildseth(dot)com>
To: Karthikeyan Sundaram <skarthi98(at)hotmail(dot)com>
Cc: postgres sql <pgsql-sql(at)postgresql(dot)org>, pgsql-php-owner(at)postgresql(dot)org
Subject: Re: quesion on functions calling from php
Date: 2007-04-17 06:08:29
Message-ID: 4624645D.70002@gildseth.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Radhika Sambamurti 2007-04-17 18:53:54 Floating point type to store numbers
Previous Message Karthikeyan Sundaram 2007-04-16 22:58:07 quesion on functions calling from php