A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/Activity.php

Line Number: 1002

Backtrace:

File: /data/wanai/wanai/application/controllers/Activity.php
Line: 1002
Function: _error_handler

File: /data/wanai/wanai/index.php
Line: 339
Function: require_once

An uncaught Exception was encountered

Type: Exception

Message: Database error occured with message : 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 desc' at line 1 select * from branchphoto where branchnumber=? order by id desc Filename: models/Product_model.php Line Number: 489

Filename: /data/wanai/wanai/application/views/errors/html/error_db.php

Line Number: 3

Backtrace:

File: /data/wanai/wanai/application/models/Product_model.php
Line: 489
Function: query

File: /data/wanai/wanai/application/controllers/Activity.php
Line: 1002
Function: branch_photo_list

File: /data/wanai/wanai/index.php
Line: 339
Function: require_once