WordPress database error: [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 'OR PH_wpc_connections.connection_type = 'quiz-to-course' AND PH_wpc_connections.' at line 1]
SELECT * FROM PH_wpc_connections LEFT JOIN PH_posts ON PH_posts.ID=PH_wpc_connections.post_from WHERE PH_wpc_connections.connection_type = 'lesson-to-course' AND PH_wpc_connections.post_to = OR PH_wpc_connections.connection_type = 'quiz-to-course' AND PH_wpc_connections.post_to = ORDER BY PH_wpc_connections.menu_order asc