Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP MySQLi Stored Procedures return call
Old 10-19-2010, 08:01 PM PHP MySQLi Stored Procedures return call
Experienced Talker

Posts: 44
Trades: 0
I cannot figure a way to retrieve the return statement in PHP. It works just perfect in MySQL, but this from PHP doesn't for some reason.

PHP Code:
<?php
        
public function call()
        {
          
$out = array();
            echo 
'<pre>';

            if (
$this->multi_query("CALL testOut(@outvar); SELECT @outvar;"))
            {
                do
                {
                    if (
$result $this->store_result())
                    {
                        while (
$row $result->fetch_object())
                        {
                            
$out[] = $row;
                        }

                        
$result->close();
                    }

                    
$this->next_result();
                }
                while (
$this->more_results());
            }

            
var_dump($out);

            return (array) 
$out;
        }
?>
Onkel E is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-21-2010, 10:54 AM Re: PHP MySQLi Stored Procedures return call
captkrackerjack's Avatar
Experienced Talker

Latest Blog Post:
Moved Blog to NGINX!
Posts: 31
Name: Greg
Location: California
Trades: 0
Your return statement is mixed up. It is currently this
Code:
return (array) $out;
Try using this statement
Code:
return $out;
__________________

Please login or register to view this content. Registration is FREE

Fav sites; last.fm, mashable.com, speckyboy.com
captkrackerjack is offline
Reply With Quote
View Public Profile Visit captkrackerjack's homepage!
 
Reply     « Reply to PHP MySQLi Stored Procedures return call
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17539 seconds with 12 queries