WordPress-Datenbank-Fehler: [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 moti.`id_item` IN("200d41e91a4f49756fa371a895701fff","8a4d62adef58c95d4b2aa3' at line 55]
select * from (SELECT cti_0.name as tree_item_0_name,
cti_0.id as tree_item_0_id,
cti_0.code as tree_item_0_code,
cti_0.id_media_object as tree_item_0_id_media_object,
cti_0.dynamic_values as tree_item_0_dynamic_values,
cti_0.`sort` as tree_item_0_sort,
cti_1.name as tree_item_1_name,
cti_1.id as tree_item_1_id,
cti_1.code as tree_item_1_code,
cti_1.id_media_object as tree_item_1_id_media_object,
cti_1.dynamic_values as tree_item_1_dynamic_values,
cti_1.`sort` as tree_item_1_sort,
cti_2.name as tree_item_2_name,
cti_2.code as tree_item_2_code,
cti_2.id as tree_item_2_id,
cti_2.id_media_object as tree_item_2_id_media_object,
cti_2.dynamic_values as tree_item_2_dynamic_values,
cti_2.`sort` as tree_item_2_sort
FROM wp_pm_search mo
LEFT JOIN wp_pm_media_object_tree_items moti ON (
moti.id_media_object = mo.id_media_objects
)
LEFT JOIN wp_pm_category_tree_items cti_0 ON (
moti.id_item = cti_0.id and cti_0.id_parent = ''
)
LEFT JOIN wp_pm_category_tree_items cti_1 ON (
cti_1.id_parent = cti_0.id AND
(
SELECT
COUNT(*)
FROM
`wp_pm_media_object_tree_items`
WHERE
`id_media_object` = mo.`id_media_objects` AND
id_item = cti_1.id
) > 0
)
LEFT JOIN wp_pm_category_tree_items cti_2 ON (
cti_2.id_parent = cti_1.id AND
(SELECT COUNT(*) FROM `wp_pm_media_object_tree_items` WHERE `id_media_object` = mo.id_media_objects AND id_item = cti_2.id) > 0
) WHERE 1=1 and
(
NOW() >= valid_from and NOW() <= valid_to
or
valid_from = '0000-00-00 00:00:00' and valid_to = '0000-00-00 00:00:00'
or
valid_from = '1970-01-01 00:00:00' and valid_to = '1970-01-01 00:00:00'
)/*page_vars_where*/ and mo.visibility = 30 and mo.id_pool = 1587 and mo.id_object_type in(1588,1589,1590) and moti.id_tree=2884 AND ( AND moti.`id_item` IN("200d41e91a4f49756fa371a895701fff","8a4d62adef58c95d4b2aa36b17c1a82d"))) as t1
/*where
(tree_item_0_id in (select id_item from wp_pm_media_object_tree_items) or tree_item_0_id is null)
and (tree_item_1_id in (select id_item from wp_pm_media_object_tree_items) or tree_item_1_id is null)
and (tree_item_2_id in (select id_item from wp_pm_media_object_tree_items) or tree_item_2_id is null)*/
order by
tree_item_0_name ASC,
tree_item_1_name ASC,
tree_item_2_name ASC