Fatal error: Uncaught mysqli_sql_exception: Commands out of sync
I built a content manager for a website and then copied it to another website.
Everything seems to work ok when I test it through Dreamweaver. The recordsets all seem to work and the insert/update scripts all connect to the database and seem to work. The problem comes when i try and view the files online I am getting this error:
Fatal error: Uncaught mysqli_sql_exception: Commands out of sync; you can't run this command now in /home/mywebsite/public_html/webassist/mysqli/rsobj.php(587) : eval()'d code:1 Stack trace: #0 /home/mywebsite/public_html/webassist/mysqli/rsobj.php(587) : eval()'d code(1): mysqli_stmt_store_result() #1 /home/mywebsite/public_html/webassist/mysqli/rsobj.php(587): eval() #2 /home/mywebsite/public_html/webassist/mysqli/rsobj.php(235): WA_MySQLi_RS->waMySQLiResultFetchAssoc() #3 /home/mywebsite/public_html/manager/Client_ID.php(24): WA_MySQLi_RS->execute() #4 {main} thrown in /home/mywebsite/public_html/webassist/mysqli/rsobj.php(587) : eval()'d code on line 1
**UPDATE**
I can see what is causing the problem, but I don't know why.
This recordset works fine:
<?php
$Recordset1 = new WA_MySQLi_RS("Recordset1",$connect_i,0);
$Recordset1->setQuery("SELECT * FROM customercontacts");
$Recordset1->execute();
?>
But this recordset throws that error:
<?php
$Recordset1 = new WA_MySQLi_RS("Recordset1",$connect_i,0);
$Recordset1->setQuery("SELECT * FROM customercontacts WHERE customercontacts.RefID=?");
$Recordset1->bindParam("i", "".((isset($_GET["ID"]))?$_GET["ID"]:"") ."", "-1"); //colname
$Recordset1->execute();
?>
It seems to throw the error when you have a variable.
Could it have something to do with the hosting? I normally use a different provider (and have never had this problem) but I am using 123-reg to host this site