Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\order\KoolPHP\KoolControls\KoolGrid\ext\datasources\MySQLiDataSource.php on line 34
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\wamp\www\order\KoolPHP\KoolControls\KoolGrid\ext\datasources\MySQLiDataSource.php on line 102
Warning: mysqli_query(): Empty query in C:\wamp\www\order\KoolPHP\KoolControls\KoolGrid\ext\datasources\MySQLiDataSource.php on line 196
On line 34 I the sql that was generated was :
SELECT COUNT(*) FROM
( SELECT *, CONCAT(custcontact, contact_title, email ) ContactSearchData FROM leadtrackusers.custcontact WHERE custid = '635' ORDER BY is_deleted, custcontact ; )
AS _TMP
Removing the semicolon fixed the issue.
$_result = mysqli_query($this->_Link, str_replace(';',' ', $_count_command) ); // remove the semicolon
The error on line 102 had a select command like this.
"SELECT * FROM
( SELECT *, CONCAT(custcontact, contact_title, email ) ContactSearchData FROM leadtrackusers.custcontact WHERE custid = '635' ORDER BY is_deleted, custcontact ; )
AS _TMP LIMIT 0 , 5"
By removing the ";"
The query worked.
Here is the code I used to fix 102, by altering the code at line 99 to remove the semicolon.
$_result = mysqli_query($this->_Link, str_replace(';', ' ', $_select_command) ); // remove semicolon
On line 196, I just added an empty check
if( !empty( $_insert_command ) && mysqli_query($this->_Link,$_insert_command)==false)
{
return false;
}
I'm not sure if these are proper fixes for those warnings, but would you guys mind applying the proper fix for future updates. Everytime I upgrade KoolPHP, I have to go fix these bugs.
Thanks guys,
Just so you know, you guys have a great product, and that is why I use it. I hope I am not being a bother, but I am just trying to help keep you guys informed.