Exception

Database Exceptionyii\db\Exception

SQLSTATE[42000]: Syntax error or access violation: 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 'JOIN catalog ct ON ct.model_id = md.id
LEFT JOIN part pt ON ct.id = pt.cat' at line 5
The SQL being executed was:
SELECT cnt.pagetitle, cnt.alias, pt.id, pt.part_id, pt.stock, pt.price, br.name as brand_name, md.name as model_name
FROM equipment as eq
JOIN brand br ON eq.brand_id = br.id AND br.id = 5
LEFT JOIN model md ON md.equipment_id = eq.id AND md.id =
LEFT JOIN catalog ct ON ct.model_id = md.id
LEFT JOIN part pt ON ct.id = pt.catalog_id
JOIN content as cnt ON cnt.id = pt.id ORDER BY cnt.pagetitle ASC LIMIT 20

Error Info: Array
(
    [0] => 42000
    [1] => 1064
    [2] => 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 'JOIN catalog ct ON ct.model_id = md.id 
					LEFT JOIN part pt ON ct.id = pt.cat' at line 5
)
$_GET = [
    'hitachi' => 'zx520-5',
];