 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
iverwell
Joined: 11 Mar 2007 Posts: 1
|
Posted: Sun Mar 11, 2007 6:01 pm Post subject: execute stored proc with php and mdb2 |
|
|
I know there is a function called executeStoredProc, could anyone share the sample code to invoke this function? btw I'm using MDB2 Mysqli extension. Million thanks!
Simon |
|
| Back to top |
|
 |
seanifool
Joined: 04 Jun 2008 Posts: 2
|
Posted: Wed Jun 04, 2008 12:13 am Post subject: example code |
|
|
good question simon...
why is there no example code on the web for how to use this executeStoredProc?
I simply can't get it working. I am getting the boring snoring mysql error message "can't return a result set in the given context" and there's no G-hits comparing that message and MDB2...
any one got executeStoredProc working with mysql? care to show us an example?
my current code that produces the above looks like this:
<?
$sr3 = $mdb2->function->executeStoredProc("give_me_a_whale" , array(1), array('id'=>'integer', 'name'=> 'text') );
if (PEAR::isError($sr3)) {
echo ('blimey!' . $sr3->getMessage().' - '.$sr3->getUserinfo());
}
?>
and the procedure (just a simple device to test this) looks like this:
CREATE PROCEDURE give_me_a_whale(IN wid INT)
BEGIN
SELECT id, name FROM whales where id=wid;
END;
any leads would be hugely appreciated!! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|