Consecutive queries in same connection not working
<p>The following code is working just fine, but the line <code>$connection-&gt;query('call user_create(145552, \'a@a.com\');');</code> is not creating a user into the database.</p>

<pre><code>function updateFacebook($id) {

    $connection = mysqli_connect('localhost', 'root', '', 'databasename');
    $count = $connection-&gt;query('call user_by_facebook_read(' . $id . ');')-&gt;num_rows;

    if ($count == 0) {

        $request = \Slim\Slim::getInstance()-&gt;request();
        $body = $request-&gt;getBody();
        $json = json_decode($body);
        $token = $json-&gt;token;

        $facebook = new Facebook(array(
            'appId' =&gt; 'value',
            'secret' =&gt; 'value',
            'cookie' =&gt; true
        ));

        $facebook-&gt;setAccessToken($token);

        $facebook-&gt;api('/me/feed', 'post', array(
            'message' =&gt; 'message',
            'picture' =&gt; 'https://www.google.com.br/images/srpr/logo4w.png',
            'link' =&gt; 'https://www.google.com.br',
            'description' =&gt; 'description',
            'name' =&gt; 'name',
            'caption'=&gt; 'caption'
        ));

        $connection-&gt;query('call user_create(145552, \'a@a.com\');');

    }

    $connection-&gt;close;

    $json = json_encode(array(
        'r' =&gt; true
    ));

    echo $json;     

}
</code></pre>

<p>If I run the following code it also works just fine:</p>

<pre><code>$connection = mysqli_connect('localhost', 'root', '', 'databasename');
$connection-&gt;query('call user_create(145552, \'a@a.com\');');
$connection-&gt;close;
</code></pre>

<p>If I close the connection after the <code>$count</code> and open it again before the user_create call it also works.</p>

<p>What is happening?</p>
