Post by stuartam » Thu Apr 14, 2016 10:38 pm

Our host has just completed updates to "operating system and system software upgrades for lon-cpanel2, slc-cpanel1, atl-cpanel1" which has caused numerous errors on our opencart site.

We have solved most with the help from the forums and reading past topics, but we have one that is still active..

Warning: mysqli_query() expects at least 2 parameters, 1 given in vqmod/vqcache/vq2-catalog_controller_common_footer.php on line 100

this line refers to the following..

if(mysqli_num_rows(mysqli_query("SHOW TABLES LIKE '" . DB_PREFIX . "company_details' "))==1){

Any help would be appreciated.

Thanks

Newbie

Posts

Joined
Thu Apr 14, 2016 10:32 pm

Post by villagedefrance » Thu Apr 14, 2016 11:07 pm

I think your SQL is not correct, try this:

Code: Select all

$mysqli_query = $this->db->query("SHOW TABLES LIKE '" . DB_PREFIX . "company_details'");

if ($mysqli_query->num_rows) {
	$company_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "company_details");

	foreach ($company_query->rows as $company) {
	    $company_data[] = array(
               ...
            );
        }
I hope this helps

OpenCart custom solutions @ https://villagedefrance.net


User avatar
Active Member

Posts

Joined
Wed Oct 13, 2010 10:35 pm
Location - UK

Post by stuartam » Wed Apr 20, 2016 11:39 pm

Hi, thanks for your reply. I have tried this, but this made no difference to the visible error

Thanks

Newbie

Posts

Joined
Thu Apr 14, 2016 10:32 pm
Who is online

Users browsing this forum: No registered users and 38 guests