Database Error; SQL: SELECT
DISTINCT
`t`.*
FROM `wp_posts` AS `t`
LEFT JOIN `wp_podsrel` AS `rel_site` ON
`rel_site`.`field_id` = 22
AND `rel_site`.`item_id` = `t`.`ID`
LEFT JOIN `wp_posts` AS `site` ON
`site`.`ID` = `rel_site`.`related_item_id`
LEFT JOIN `wp_podsrel` AS `rel_site_payment_option` ON
`rel_site_payment_option`.`field_id` = 61
AND `rel_site_payment_option`.`item_id` = `site`.`ID`
LEFT JOIN `wp_posts` AS `site_payment_option` ON
`site_payment_option`.`ID` = `rel_site_payment_option`.`related_item_id`
WHERE ( ( ”`site_payment_option`.`post_name` AND t.post_status='publish' ) AND ( `t`.`post_type` = 'offer' ) )
GROUP BY t.id
ORDER BY `site`.`menu_order`, `t`.`menu_order`, `t`.`post_title`, `t`.`post_date`
LIMIT 0, 11; Response: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '`site_payment_option`.`post_name` AND t.post_status='publish' ) AND ( `t`.`po...' at line 22