Re: Using MySQLi (OOP) to call a stored procedure with INOUT and OUT parameters.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 12 Sep 2011 21:18:34 +0100, Richard Quadling wrote:

>I'm just trying to get PHP to talk to a stored procedure which has IN,
>INOUT and OUT parameters.
>[...]

You'll probably need to trick it into returning a row with your output
params, like using this multi-statement query:

"CALL testInOuts(10, @myNewInt, @myNewDT);SELECT @myNewInt, @myNewDT"

see TFM for multi-query usage:

http://au2.php.net/manual/en/mysqli.multi-query.php

>P.S. I'm coming from MSSQL using the MS SQL Server Driver for PHP via
>PDO, so a very different experience.

Indeed, PDO is probably what you should be using if you want to use
output parameters and MySQL in PHP.
-- 
Ross McKay, Toronto, NSW Australia
"The documentation and sample application having failed me,
 I resort to thinking. This desperate tactic works, and I
 resolve that problem and go on to the next"
 - Michael Swaine,  "Programming Paradigms",  Dr Dobb's Journal

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux