Quantcast
Channel: PHP - MySQL gets value of out parameter from a stored procedure - Stack Overflow
Browsing latest articles
Browse All 6 View Live

Answer by SATYAJEET RANJAN for PHP - MySQL gets value of out parameter from a...

Here is the working solution:enter code $res = $conn->multi_query( "CALL PROCNAME(@x);SELECT @x" );if( $res ) { $results = 0; do { if ($result = $conn->store_result()) { printf( "<b>Result...

View Article


Answer by Prabakar Sebastin for PHP - MySQL gets value of out parameter from...

Another correct methods its working fine: Cheers!!$procedureName = 'VALIDATE_USER';$procedure = "CALL $procedureName('$username','$pwd',@p_userid)";$results1 =...

View Article


Answer by TerryE for PHP - MySQL gets value of out parameter from a stored...

Or even just do a "SELECT @id AS id" then $row->id will work fine. I always rename select columns to keep the name meaningful when necessary :-)BTW, you can simply concatenate the call and select...

View Article

Answer by Palladium for PHP - MySQL gets value of out parameter from a stored...

Alternatively, you can just fetch the data as an array using mysqli::fetch_assoc() and access the data using $row['@id'].

View Article

Answer by Madara's Ghost for PHP - MySQL gets value of out parameter from a...

Just $row->{"@id"} would work here. You can't use an stdClass as an array ($row[0]...).

View Article


PHP - MySQL gets value of out parameter from a stored procedure

I have called a MySQL stored procedure from PHP using mysqli. This has one out parameter.$rs = $mysqli->query("CALL addNewUser($name,$age,@id)");Here, @id is the out parameter. Next, I fire the...

View Article
Browsing latest articles
Browse All 6 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>