php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54416 Mysqli return warning if calling more than one stored procedure
Submitted: 2011-03-29 11:15 UTC Modified: 2011-05-02 08:51 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: anjusb712 at gmail dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.2.17 OS: Ubuntu
Private report: No CVE-ID: None
 [2011-03-29 11:15 UTC] anjusb712 at gmail dot com
Description:
------------
<?php
	$con = mysqli_connect("localhost","root","root","hcms");
	//procedureCall.php

	$qryProdChk = "call Get_schoolProductDetail(0,0,0,0,'')";
	$rsProdChk  = mysqli_query($con,$qryProdChk);
	$rowProdChk = mysqli_fetch_array($rsProdChk,MYSQLI_ASSOC);
	
        mysqli_free_result($rsProdChk);

	echo $qryProdDet = "call Get_keltronProduct(".$proddId.",0,0,0,'".$slNo."')";
	$rsProdDet  = mysqli_query($con,$qryProdDet);
	$rowProdDet = mysqli_fetch_array($rsProdDet,MYSQLI_ASSOC);
?>
On executing this script I got a warning like  
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /var/www/storedProcedure/procedureCall.php on line 13

Plz help me to solve this issue.....


Test script:
---------------
<?php
	$con = mysqli_connect("localhost","root","root","hcms");
	//procedureCall.php

	$qryProdChk = "call Get_schoolProductDetail(0,0,0,0,'')";
	$rsProdChk  = mysqli_query($con,$qryProdChk);
	$rowProdChk = mysqli_fetch_array($rsProdChk,MYSQLI_ASSOC);
	
        mysqli_free_result($rsProdChk);

	echo $qryProdDet = "call Get_keltronProduct(".$proddId.",0,0,0,'".$slNo."')";
	$rsProdDet  = mysqli_query($con,$qryProdDet);
	$rowProdDet = mysqli_fetch_array($rsProdDet,MYSQLI_ASSOC);
?>

Expected result:
----------------
I want to compare the values from the result of the two procedures.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-02 08:51 UTC] frozenfire@php.net
-Status: Open +Status: Bogus
 [2011-05-02 08:51 UTC] frozenfire@php.net
This looks to be an issue with your code, rather than an issue with the MySQLi 
extension. I think you may be using mysqli_free_result, which doesn't exist, 
instead of mysqli_stmt_free_result.

Before submitting a bug report, it's best to check with a support forum like 
##php on Freenode to ensure that your code is not malformed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC