SQL failed; SQL: SELECT SQL_CALC_FOUND_ROWS DISTINCT t.*, p.id AS pod_id, p.created, p.modified FROM wp_pod p INNER JOIN `wp_pod_tbl_testimonials` t ON t.id = p.tbl_row_id LEFT JOIN wp_pod_rel r1 ON r1.field_id = 62 AND r1.pod_id = p.id LEFT JOIN `wp_pod_tbl_clients` `client` ON `client`.id = r1.tbl_row_id WHERE p.datatype = 9 AND ( client.id= ) ORDER BY RAND() LIMIT 0,1; Response: 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 ') ORDER BY RAND() LIMIT 0,' at line 16