2014-12-26, 09:33 PM
Hi
I read than when I have query for a STORE PROCEDURE I should to use multi_query instead of query, BUT WHERE IS MY ERROR
myfile.php
db_mysqli.php I added this
But I have still the error
why was moved?
I read than when I have query for a STORE PROCEDURE I should to use multi_query instead of query, BUT WHERE IS MY ERROR
myfile.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);
?>
db_mysqli.php I added this
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);
}
But I have still the error
Quote: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
why was moved?