Yo lei que cuando llame a un STORE PROCEDURE debo usar un multi_query, en lugar de una query comun, ya he seguido mas de un tutorial, pero no me sale
myfile.php
Código PHP:
<?php
* *
define('IN_MYBB', 1);
//$templatelist="TD_Clasif,TD_clasif_colapsa,TD_clasif_sinjs";
require_once '../FORO/global.php';
$sql="CALL BUSCAR('%%',0,9900,'','DESC',0,0,0,'00');";
//$db->multi_query($sql);
if ($db->multi_query($sql))
{
*do
* *{
* *// Store first result set
* *if ($result=$db->store_result($sql))
* * *{
* * *while ($filas=$db->fetch_array($result))
* * * *{
* * * *$html.=$filas['PRODUCTO'];
* * * *}
* * *$db->free_result();
* * *}
* *}
*while ($db->next_result());
}
eval("\$page = \"".$templates->get("TD_AJAX")."\";");
output_page($page); *
?>
Código PHP:
function next_result(){
@mysqli_next_result($this->current_link);
}
function store_result($sql){
@mysqli_store_result($this->current_link,$sql);
}
function multi_query($sql){
@mysqli_multi_query($this->current_link,$sql);
}
Cita:
SQL Error:
2014 - Commands out of sync; you can't run this command now
Query:
SELECT template FROM mybb_templates WHERE title='TD_AJAX' AND sid IN ('-2','-1','1') ORDER BY sid DESC LIMIT 1
2014 - Commands out of sync; you can't run this command now
Query:
SELECT template FROM mybb_templates WHERE title='TD_AJAX' AND sid IN ('-2','-1','1') ORDER BY sid DESC LIMIT 1