Re: PHP/5.0.3 & MySQL 5.0.2 Stored procedure (OUT)

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

 



Curt Zirzow wrote:

> * Thus wrote Ian Porter:
>> Hi,
>> 
>> I am just wondering how to obtain the result from a mysql procedure OUT
>> parameter within PHP e.g.
>> 
>> MYSQL
>> create procedure test_out(OUT testvar int)
>> BEGIN
>>  select max_connections into testvar from mysql.user limit 1;
>> END
>> 
>> PHP
>> 
>> $query = 'call test_out('.$test_val.')';
>> $query_handle = mysql_query($query);
> 
> You should really be using the mysqli* interface to mysql. It
> provides better ways to execute things like that.
> 
> http://php.net/mysqli

Thanks very much, that did the trick.

Cheers
Ian
> 
> 
> Curt

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux