A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/Home.php

Line Number: 380

Backtrace:

File: /home/orofitco/public_html/site/controllers/Home.php
Line: 380
Function: _error_handler

File: /home/orofitco/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/orofitco/public_html/system/core/Exceptions.php:271)

Filename: core/Common.php

Line Number: 564

Backtrace:

File: /home/orofitco/public_html/site/models/Home_model.php
Line: 251
Function: query

File: /home/orofitco/public_html/site/controllers/Home.php
Line: 380
Function: relatedproduct

File: /home/orofitco/public_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 MySQL server version for the right syntax to use near 'and p.enabled = 0 order by set_order asc limit 4' at line 1

SELECT p.*,( select min(price) from product_attribute where p_id = p.id ) as `minprice`,IFNULL(im.image,'noimage.jpg') as base_image FROM product p LEFT JOIN product_image im ON im.pid=p.id and im.baseimage=1 where p.id !=39 and p.category_id= and p.enabled = 0 order by set_order asc limit 4

Filename: models/Home_model.php

Line Number: 251