A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/blog.php

Line Number: 127

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/blog.php

Line Number: 131

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 madacms_posts.status = '1'' at line 4

SELECT count(madacms_posts.post_id) as count_posts FROM (`madacms_posts`) LEFT JOIN `madacms_post_stats` ON madacms_posts.post_id = madacms_post_stats.post_id WHERE madacms_posts.user_id = AND madacms_posts.status = '1'