A PHP Error was encountered

Severity: Notice

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

Filename: controllers/Products.php

Line Number: 81

Backtrace:

File: /home/vipras/public_html/application/controllers/Products.php
Line: 81
Function: _error_handler

File: /home/vipras/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/vipras/public_html/system/core/Exceptions.php:271)

Filename: core/Common.php

Line Number: 564

Backtrace:

File: /home/vipras/public_html/application/models/ProductPicsModel.php
Line: 10
Function: query

File: /home/vipras/public_html/application/controllers/Products.php
Line: 82
Function: lists

File: /home/vipras/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 'ORDER BY id' at line 1

SELECT * FROM productpics WHERE pid = ORDER BY id

Filename: models/ProductPicsModel.php

Line Number: 10