php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40143 how to get parameter values of stored procedure.?
Submitted: 2007-01-16 12:02 UTC Modified: 2007-01-16 12:54 UTC
From: hd4_all at yahoo dot co dot in Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.2.0 OS: windows 2000 prof.
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hd4_all at yahoo dot co dot in
New email:
PHP Version: OS:

 

 [2007-01-16 12:02 UTC] hd4_all at yahoo dot co dot in
Description:
------------
I want to get parameter values of stored procedure in the php variable..
I have submited one procedure of mysql and now i want get value of 'id' in the php variable then how can i do this..??
Is it possible to do this.??

Reproduce code:
---------------
create procedure test(OUT id INT)
begin
     select e_id into id from table where name="Hardik";
end;

<?php 
	$link = mysqli_connect("localhost","root","mysql","shopping_cart");
        $id=0;
	mysqli_multi_query($link, "call test($id)")
	mysqli_store_result($link)) 
	  		mysqli_query($link,$query);
        echo $id;
?>

Expected result:
----------------
my expected result is that the value of '$id' is the id of
the person 'Hardik'...

Actual result:
--------------
It gives an error that can't pass direct value to OUT or INOUT parameter..

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-16 12:54 UTC] tony2001@php.net
MySQL API does not provide any means for that.
Not PHP problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 04:01:34 2024 UTC