From: kzuzik at ukr dot net
Operating system: WinXP
PHP version: 5.0.0b3 (beta3)
PHP Bug Type: MySQL related
Bug description: unable to procedure procedure call results for mysql 5.0.0
Description:
------------
It looks like php5 doesn't yet support stored procedures which appeared in
mysql5.
Please see the code below (from the PHP Manual)
If I uncomment line 4 and comment line 5 everything works OK.
If the code works as provided and I try to call a stored procedure "yyy"
(which includes a simple select statement) I have the following error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in c:\Inetpub\wwwroot\index.php on line 9
Reproduce code:
---------------
<?
$link = mysql_connect("localhost", "root", "");
mysql_select_db("mysql");
//$query = "select * from user";
$query = "call yyy()";
$result = mysql_query($query);
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
?>
Expected result:
----------------
I expect to see the results of calling a stored procedure (which executes
a select statement)
--
Edit bug report at http://bugs.php.net/?id=26803&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26803&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26803&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26803&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26803&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26803&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26803&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26803&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26803&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26803&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26803&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26803&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26803&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26803&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26803&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26803&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26803&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26803&r=float