user warning: query: SELECT n.title, n.nid FROM webform w LEFT JOIN node n ON w.nid = n.nid WHERE w.block = 1 AND n.type IN (0) in /xxxx/www/sites/all/modules/webform/webform.module on line 1385.
The query should be:
SELECT n.title, n.nid FROM webform w LEFT JOIN node n ON w.nid = n.nid WHERE w.block = 1 AND n.type IN ('0')
The code is:
$placeholders = db_placeholders($webform_node_types);
$result = db_query("SELECT n.title, n.nid FROM {webform} w LEFT JOIN {node} n ON w.nid = n.nid WHERE w.block = 1 AND n.type IN ($placeholders)", $webform_node_types);
How to escape these placeholders with single quotes?
Comments
Comment #1
erik.erskine commentedThe query should be this:
The call to db_placeholders is wrong. That should be:
Comment #2
quicksketchThanks, very correct. Committed.