LINE 223: mysqli_query: Invalid query: 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 (FIND_IN_SET('noSearch', IFNULL(t.format, '')) = 0) AND (d.draft = 0) ORDER ' at line 19 The query is: SELECT t.vin,
t.entry_id,
CASE WHEN t.dept_format IS NOT NULL AND t.title IS NOT NULL THEN CONCAT(t.dept_format,
':',
IFNULL(t.title_html,
t.title)) WHEN t.dept_format IS NOT NULL AND t.title IS NULL THEN t.dept_format WHEN t.dept_format IS NULL THEN IFNULL(t.title_html,
t.title) END AS title,
IFNULL(t.subtitle_1_html,
t.subtitle_1) AS subtitle_1,
IFNULL(t.subtitle_2_html,
t.subtitle_2) AS subtitle_2,
t.author_text,
CONCAT( '',
'CQ Vol. ',
d.volume,
' No. ',
REPLACE(d.issue,
'.',
'/'),
',
',
d.season,
' ',
d.year,
'
' ) AS citation,
d.title_focus,
d.insert,
IFNULL(p.dept_html,
p.dept) AS dept,
IFNULL(p.section_html,
p.section) AS section,
t.page,
t.end_page FROM cq_daniel.ci_toc_data t JOIN cq_daniel.ci_toc_issues d ON t.vin = d.vin LEFT JOIN cq_daniel.ci_toc_data p ON p._rowid = t.section_parent_id OR p._rowid = t.dept_parent_id WHERE AND (FIND_IN_SET('noSearch',
IFNULL(t.format,
'')) = 0) AND (d.draft = 0) ORDER BY t.entry_id DESC;