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 '-1,1' at line 37]
SELECT distinct(mo.id_media_objects) as id_media_object,mo.id_object_type,
mo.name,
mo.code,
mo.tags,
(
SELECT
`data`
FROM
`wp_pm_media_objects`
WHERE
`id_media_objects` = mo.`id_media_objects`
LIMIT
1
) as data,
mo.id_pool,
mo.visibility,
mo.valid_from,
mo.valid_to,
mo.url,
mo.min_price as sortprice,
mo.next_departure as sortdate, tbpT.`duration` FROM wp_pm_search mo left join wp_pm_touristic_dates td on (mo.id_media_objects = td.id_media_object) left join wp_pm_touristic_booking_packages tbpT on (mo.id_media_objects = tbpT.id_media_object) 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 in(30,60) and mo.id_pool = 858 and mo.id_object_type in(215,1030) and mo.id_object_type != 1030/*query_vars_where*/ and mo.text like '%Abschlussfahrt%' and mo.text like '%Fehmarn%'/*query_vars_where / touristic */ and tbpT.`duration` >= 1 order by tbpT.duration asc,CASE
WHEN mo.`name` LIKE '%Abschlussfahrt%' THEN 1
WHEN mo.`text` LIKE 'Abschlussfahrt%' THEN 2
WHEN mo.`text` LIKE '%Abschlussfahrt%' THEN 3
WHEN mo.`text` LIKE '%Abschlussfahrt' THEN 4
ELSE 5
END
limit -1,1