title: Call Mysql function from Slim Framework
body: <p>I'm trying to call a function I created in MySQL using the Slim framework.
  This is my function in DBHandler.php:</p>
  
  <pre><code>public function validarSincronismo($pCnpj, $pLogin, $pImei){
      $stmt = $this-&gt;conn-&gt;prepare("SELECT sincronizar(?,?,?)");
      $stmt-&gt;bind_param("sss", $pCnpj, $pLogin, $pImei);
      $result = $stmt-&gt;execute();
      $stmt-&gt;close();
      return $result;
  }
  </code></pre>
  
  <p>And this is the function in my index.php:</p>
  
  <pre><code>$app-&gt;post('/validar', function() use ($app) {
      $db = new DbHandler();
      $cnpj =    $app-&gt;request-&gt;post('cnpj');    
      $login = $app-&gt;request-&gt;post('login');
      $imei = $app-&gt;request-&gt;post('imei');
      $msg = $db-&gt;validarSincronismo($cnpj, $login, $imei);                 
      $response["error"] = false;
      $response["message"] = $msg;
      echoRespnse(201, $response);
  });
  </code></pre>
  
  <p>And I'm getting the following error in <code>phperror.log</code>:</p>
  
  <pre><code>[17-Sep-2015 21:12:37 UTC] PHP Fatal error:  Call to a member function execute() on boolean in C:\MAMP\htdocs\test\include\DbHandler.php on line 69
  </code></pre>
  
  <p>I tried using <code>CALL sincronizar(?,?,?);</code> But it doesn't execute the SQL function.</p>