I am working on Point of sale system built on codeigniter. I get this error "Call to a member function num_rows() on boolean". I have just moved to linux and install lamp. I get the similar error on wamp, at that time i removed wamp and install xampp and it work. now i want to use lamp , every thing is good expect it get this error. I have changed php version but it does not help. i can not change in code because it has been used in hundred of places. currently i am using php PHP Version 7.0.27 , Apache/2.4.18, sql version :mysqladmin Ver 8.42 Distrib 5.7.20, for Linux on x86_64. also why it is working in xampp but give error on wamp and lamp, Here is full error
An uncaught Exception was encountered
Type: Error
Message: Call to a member functionnum_rows()
on boolean
Filename:/var/www/html/dev.com/public_html/gspos/app/models/admin/Products_model.php
Line Number: 206 Backtrace:
File:/var/www/html/dev.com/public_html/gspos/app/controllers/admin/Products.php
Line: 2053
Function: getAllWarehousesWithPQ
File:/var/www/html/dev.com/public_html/gspos/index.php
Line: 302
Function: require_once