A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/Cities.php

Line Number: 24

Backtrace:

File: /home/askmrk/public_html/application/controllers/Cities.php
Line: 24
Function: _error_handler

File: /home/askmrk/public_html/index.php
Line: 292
Function: require_once

A PHP Error was encountered

Severity: Warning

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

Filename: core/Common.php

Line Number: 568

Backtrace:

File: /home/askmrk/public_html/application/models/Busineses.php
Line: 443
Function: query

File: /home/askmrk/public_html/application/controllers/Cities.php
Line: 24
Function: get_cities_listing

File: /home/askmrk/public_html/index.php
Line: 292
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 '-10, 10' at line 4

select DISTINCT `business`.*,register_users.fname,register_users.lname, oc_country.name, ifnull(reviews.counts,0) as reviews_count, ifnull(reviews.avgs,0) as reviews_avg from `business` INNER JOIN register_users ON register_users.id = business.user_id LEFT OUTER JOIN oc_country ON oc_country.iso_code_3 = business.bus_country LEFT OUTER JOIN (Select count(id) as counts, AVG(rating) as avgs, bus_id from bus_reviews group by bus_id) as reviews on reviews.bus_id = business.id where 1 order by bus_gold_certified DESC , bus_approved DESC , bus_advertise DESC limit -10, 10

Filename: models/Busineses.php

Line Number: 443