Subject RE: [firebird-php] SPs Docs
Author Nigel Weeks
You've actually tried that?

I just get:

Warning: ibase_query(): message length error (encountered 0, expected 16) in
/usr/local/www/data/test.php on line 4

Warning: ibase_fetch_object(): supplied argument is not a valid InterBase
result resource in /usr/local/www/data/test.php on line 5

My PHP looks like:

<?php
$conn = ibase_connect("localhost:/u1/db/test.fdb","nigel","nigel");
$sql = "EXECUTE PROCEDURE SP_INS_TEST('hi')";
$rec = ibase_query($sql);
if($obj = ibase_fetch_object($rec)){
echo "1 ".$obj->RHUBARB."<br>";
echo "2 ".$obj[0]."<br>";
}
?>

Which PHP version did you use that this worked on?

Nige.


> -----Original Message-----
> From: Milan Babuskov [mailto:milanb@...]
> Sent: Thursday, 18 November 2004 8:59 AM
> To: firebird-php@yahoogroups.com
> Subject: Re: [firebird-php] SPs Docs
>
>
>
> Nigel Weeks wrote:
> >>It just can't be done (at least in current FB versions). You
> >>need either
> >>selectable stored procedure or a select to return *anything*.
> >>Selectable
> >>SP is out of the question. To insert records you need DML-SP which
> >>cannot be selected from or joined with a table, so you can't go with
> >>select either.
> >
> > Does anyone know if you can execute an 'Execute procedure' from PHP?
>
> Sure.
>
> ibase_query("execute procedure some_nonselectable_sp(params)");
>
> If it is selectable do:
>
> ibase_query("select * from some_selectable_sp(params)");
>
> --
> Milan Babuskov
> http://fbexport.sourceforge.net
> http://www.flamerobin.org
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> $9.95 domain names from Yahoo!. Register anything.
> http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/PhFolB/TM
> --------------------------------------------------------------
> ------~->
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>