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 model md ON md.equipment_id = eq.id
LEFT JOIN catalog ct ON ct.model_i' at line 4
The SQL being executed was:
SELECT cnt.pagetitle, cnt.alias, ct.desc, pt.id, pt.part_id, pt.stock, pt.price, br.name as brand_name
FROM equipment as eq
JOIN brand br ON eq.brand_id = br.id AND br.id =
LEFT JOIN model md ON md.equipment_id = eq.id
LEFT JOIN catalog ct ON ct.model_id = md.id
LEFT JOIN part pt ON ct.id = pt.catalog_id and pt.id IN (29,102,127,152,227,252,277,302,327,352,423,448,473,498,523,548,573,598,623,808,833,980,1005,1030,1055,1080,1105,1130,1155,1180,1205,1230,1280,1305,1330,1355,1380,1405,1430,1455,1480,1505,1530,1576,1601,1626,1653,1678,1708,1733,2525,2550,2575,2599,2624,2649,2674,2698,2723,2748,2773,2798,2823,2848,2873,2898,2923,2948,2973,2998,3023,3048,3072,3097,3122,3222,3247,3272,3297,3322,3347,3372,3397,3422,3447,3472,3497,3522,3547,3572,3597,3622,3647,3737,3763,3789,3815,3841,3968,3992,4016,4046,4071,4096,4121,4146,4171,4202,4226,4250,4274,4298,4322,4355,4380,4405,4430,4455,4480,4505,4530,4555,4586,4603,4620,4637,4654,4684,4709,4736,4761,4777,4794,4811,4828,4845,4862,4924,4938,4952,4966,4980,4994,5008,5022,5050,5064,5078,5092,5106,5134,5148,5162,5176,5190,5204,5218,5232,5246,5260,5274,5288,5302,5316,5330,5344,5358,5372,5386,5400,5414,5428,5442,5456,5499,5519,5539,5559,5579,5599,5619,5639,5659,5679,5699,5719,5739,5759,5779,5799,5819,5839,5859,5879,5899,5919,5939,5959,5979,5999,6019,6039,6059,6080,6094,6108,6122,6136,6150,6164,6178,6192,6203,6220,6237,6266,6287,6306,6332,6350,6368,6386,6404,6422,6434,6451,6468,6485,6502,6519,6536,6553,6570,6587,6604,6621,6638,6655,6672,6689,6706,6723,6740,6757,6774,6791,6808,6825,6910,6927,6944,6961,6978,6995,7012,7029,7050,7063,7076,7089,7102,7190,7207,7224,7241,7258,7275,7292,7309,7326,7343,7360,7377,7394,7411,7428,7445,7462,7487,7504,7521,7538,7555,7572,7589,7606,7624,7674,7699,7727,7751,7775,7800,7829,7854,7879,7904,7931,7956,7974,7991,8008,8035,8052,8069,8086,8103,8120,8137,8154,8171,8188,8217,8241,8266,8301,8326,8351,8376,8401,8426,8451,8476,8501,8526,8730,8747,8764,8781,8798,8815,8832,8860,8888,8902,8916,8930,8944,8958,8972,8986,8997,9014,9031,9061,9092,9221,9403,9547,9571,9595,9619,9643,9667,9835,9860,9885,9910,9935,9960,9985,10010,10035,10060,10085,10114,10138,10162,10186,10234,10259,10284,10309,10334,10359,10384,10409,10428,10445,10462,10479,10506,10520,10534,10548,10601,10615,10629,10643,10657,10671,10685,10699,10713,10727,10741,10755,10769,10783,10797,10811,10825,10839,10853,10867,10881,10895,10909,10923,10937,10951,10965,10979,10993,11007,11021,11035,11049,11063,11077,11091,11105,11119,11133,11166,11183,11200,11217,11234,11251,11268,11285,11302,11319,11336,11353,11370,11387,11404,11421,11438,11455,11472,11489,11506,11523,11540,11557,11574,11618,11635,11652,11669,11686,11703,11720,11737,11754,11771,11788,11805,11822,11839,11856,11873,11890,11907,11924,11941,11958,11975,11992,12009,12026,12043,12060,12077,12094,12111,12128,12145,12162,12179,12196,12213,12230,12247,12264,12281,12324,12340,12356,12372,12581,12598,12615,12665,12679,12693,12707,12721,12735,12749,12763,12777,12791,12805,12819,12833,12847,12861,12875,12889,12903,12917,12931,12945,12959,12973,12987,13001,13015,13029,13055,13079,13103,13127,13151,13175,13585,13599,13614,13639,13658,13677,13696,13715,13734,13753,13772,13791,13810,13829,13848,13867,13886,13920,13934,13948,13962,13976,13990,14004,14018,14032,14372)
JOIN content as cnt ON cnt.id = pt.id LIMIT 40

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 model md ON md.equipment_id = eq.id
					LEFT JOIN catalog ct ON ct.model_i' at line 4
)
$_GET = [
    'cylinder_block_' => '_valve_plate',
];