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 ')) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN al' at line 84 SQL=SELECT tAll.id , COUNT(tAll.id) AS count FROM (( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_category_item AS tCategoryItem ON tCategoryItem.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tCategoryItem.category_id LIKE '%636%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tItem.name LIKE '%продавец,%' AND tItem.name LIKE '%бухгалтер,кассир%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_475de663f0c14581acfd63c260a853b1_s LIKE '%Златоуст\\nЧелябинск%' AND tIndex.e_475de663f0c14581acfd63c260a853b1_s LIKE '%област%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_3deb6123a1c042c19e7cd308e9423d9e_s LIKE '%8000%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_d584d1ea061d48228870a165a09b7de9_s LIKE '%Резюм%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_cb01156f4cc3471bb3ea3e7892d6b861_s LIKE '%продавец,%' AND tIndex.e_cb01156f4cc3471bb3ea3e7892d6b861_s LIKE '%бухгалтер,кассир%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_87680e2bdc2247ad96f9c6fc33af20aa_s LIKE )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_fecdb53b999a4e91a69585113b500583_s LIKE '%полн%' AND tIndex.e_fecdb53b999a4e91a69585113b500583_s LIKE '%рабоч%' AND tIndex.e_fecdb53b999a4e91a69585113b500583_s LIKE '%ден%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_336f243b011b444fa506359ac8565b8d_s LIKE '%Постоянн%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_dd310393978a48b0b5d3976004ee46a3_s LIKE '%год%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_5a7253bb5ae34756a15e9b928f64e294_s LIKE '%ОО%' AND tIndex.e_5a7253bb5ae34756a15e9b928f64e294_s LIKE '%«Златмясокомбинат»%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_b19bf8f632234bcfa711011c457fad61_s LIKE '%высше%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_8483aaad20da4fa488ed6c53a03f8ce3_s LIKE '%ест%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_4d5094f852344b7390db4f2d5cbeabb1_s LIKE )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_8d3983cc8d6445d594f3c6138bfb6a61_s LIKE '%Анн%' AND tIndex.e_8d3983cc8d6445d594f3c6138bfb6a61_s LIKE '%Александровн%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_382a1b50d818400891de7252f8d39bfb_s LIKE '%+79194035133%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_1fe6498e81af4375acdfb4a9ceb3b99c_s LIKE '%недел%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_34ec13e82fc74ff2a550558dcaef0b25_s LIKE '%Бухгалтерск%' AND tIndex.e_34ec13e82fc74ff2a550558dcaef0b25_s LIKE '%учет%' )) ) UNION ALL ( SELECT tItem.id AS id FROM 43hg85_zoo_item AS tItem LEFT JOIN 43hg85_zoo_jbzoo_index_1job AS tIndex ON tIndex.item_id = tItem.id WHERE tItem.access IN (1,2,3) AND tItem.state = '1' AND (tItem.publish_up = '0000-00-00 00:00:00' OR tItem.publish_up <= '2014-09-15 08:45:57') AND (tItem.publish_down = '0000-00-00 00:00:00' OR tItem.publish_down >= '2014-09-15 08:45:57') AND tItem.id <> '21521' AND tItem.application_id = '6' AND ((tIndex.e_8af8e8a3e7654e9b879cb16cbf606fdb_s LIKE '%Персонал%' )) )) AS tAll GROUP BY tAll.id HAVING count >= '4' ORDER BY count DESC LIMIT 5