php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26803 unable to process procedure call results for mysql 5.0.0
Submitted: 2004-01-05 17:27 UTC Modified: 2004-01-05 21:59 UTC
From: kzuzik at ukr dot net Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.0.0b3 (beta3) OS: WinXP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kzuzik at ukr dot net
New email:
PHP Version: OS:

 

 [2004-01-05 17:27 UTC] kzuzik at ukr dot net
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)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-05 18:22 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You need to use mysqli extension for MySQL 4.1+ 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC