A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'tc_id' of non-object

Filename: models/Homemodel.php

Line Number: 156

Backtrace:

File: /mnt/volume_sfo2_03/www/thassociates.biz/html/application/models/Homemodel.php
Line: 156
Function: _error_handler

File: /mnt/volume_sfo2_03/www/thassociates.biz/html/application/controllers/Home.php
Line: 222
Function: get_id_by_slug

File: /mnt/volume_sfo2_03/www/thassociates.biz/html/index.php
Line: 315
Function: require_once

Database Error

A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'or `tbl_productCategories`.`tpc_subCategoryID` =) AND `tp_isActive` = 1 AND `tp_' at line 4

SELECT DISTINCT `tp_item_number` FROM `tbl_products` JOIN `tbl_productCategories` ON `tbl_productCategories`.`tpc_item_number` = `tbl_products`.`tp_item_number` WHERE (`tbl_productCategories`.`tpc_categoryID` = or `tbl_productCategories`.`tpc_subCategoryID` =) AND `tp_isActive` = 1 AND `tp_IsImageAvailable` = 1 AND `tp_vendorID` = 42 ORDER BY `tp_title` ASC

Filename: models/Products_model.php

Line Number: 51