pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedquesion on functions calling from php
2+ messages / 2 participants
[nested] [flat]
* quesion on functions calling from php
@ 2007-04-16 22:58 Karthikeyan Sundaram <skarthi98@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Karthikeyan Sundaram @ 2007-04-16 22:58 UTC (permalink / raw)
To: pgsql-sql; pgsql-php-owner@postgresql.org
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.
What may be the problem?
I am using PEAR object module for the db connections.
Please advise.
Regards
skarthi
_________________________________________________________________
Get a FREE Web site, company branded e-mail and more from Microsoft Office Live!
http://clk.atdmt.com/MRT/go/mcrssaub0540002919mrt/direct/01/=
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: quesion on functions calling from php
@ 2007-04-17 06:08 Tommy Gildseth <tommy@gildseth.com>
parent: Karthikeyan Sundaram <skarthi98@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tommy Gildseth @ 2007-04-17 06:08 UTC (permalink / raw)
To: Karthikeyan Sundaram <skarthi98@hotmail.com>; +Cc: pgsql-sql; pgsql-php-owner@postgresql.org
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-04-17 06:08 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-16 22:58 quesion on functions calling from php Karthikeyan Sundaram <skarthi98@hotmail.com>
2007-04-17 06:08 ` Tommy Gildseth <tommy@gildseth.com>
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