ただいま営業時間外

DB接続失敗3(query). drug_effect_tbl 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 ') AND drug_effect_tbl.effect_theme_id is NULL) || (drug_effect_tbl.effect_theme_' at line 1||SELECT item_tbl.item_id FROM item_tbl, effect_tbl, drug_tbl, item_type_tbl, drug_effect_tbl, piece_tbl, theme_tbl where drug_tbl.drug_id = item_tbl.drug_id AND item_tbl.drug_id = drug_effect_tbl.drug_id AND drug_effect_tbl.effect_id = effect_tbl.effect_id AND piece_tbl.item_id = item_tbl.item_id AND piece_tbl.piece_total_count>0 AND ((theme_tbl.theme_id = effect_tbl.theme_id AND effect_tbl.theme_id in () AND drug_effect_tbl.effect_theme_id is NULL) || (drug_effect_tbl.effect_theme_id is NOT NULL AND theme_tbl.theme_id = drug_effect_tbl.effect_theme_id AND drug_effect_tbl.effect_theme_id in ())) AND (theme_tbl.recommend_item1 = item_tbl.item_id || theme_tbl.recommend_item2 = item_tbl.item_id) group by item_tbl.item_id order by piece_tbl.piece_amount, theme_tbl.recommend_item1, theme_tbl.recommend_item2