An exposed filter with setting 'contains any word' for a text field give the sql error below when the first letter of the the search string is a 'b' e.g. 'blog'

* user warning: 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 'node'bog%')))' at line 1 query: pager_query SELECT count(node.nid) FROM node node LEFT JOIN content_field_name node_data_field_name ON node.vid = node_data_field_name.vid LEFT JOIN content_field_contact_person node_data_field_contact_person ON node.vid = node_data_field_contact_person.vid LEFT JOIN content_field_telephone_no node_data_field_telephone_no ON node.vid = node_data_field_telephone_no.vid LEFT JOIN content_field_email node_data_field_email ON node.vid = node_data_field_email.vid WHERE (node.status = '1') AND (node.type IN ('courier')) AND ((UPPER(node_data_field_name.field_name_value) LIKE UPPER(''node'bog%'))) in /var/www/sites/telamenta-drupal5/includes/database.mysql.inc on line 172.
* user warning: 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 'node'bog%'))) ORDER BY node_title ASC, node_title ASC LIMIT 0, 10' at line 1 query: pager_query SELECT node.nid, node.title AS node_title, node.changed AS node_changed, node_data_field_contact_person.field_contact_person_value AS node_data_field_contact_person_field_contact_person_value, node_data_field_telephone_no.field_telephone_no_value AS node_data_field_telephone_no_field_telephone_no_value, node_data_field_email.field_email_email AS node_data_field_email_field_email_email FROM node node LEFT JOIN content_field_name node_data_field_name ON node.vid = node_data_field_name.vid LEFT JOIN content_field_contact_person node_data_field_contact_person ON node.vid = node_data_field_contact_person.vid LEFT JOIN content_field_telephone_no node_data_field_telephone_no ON node.vid = node_data_field_telephone_no.vid LEFT JOIN content_field_email node_data_field_email ON node.vid = node_data_field_email.vid WHERE (node.status = '1') AND (node.type IN ('courier')) AND ((UPPER(node_data_field_name.field_name_value) LIKE UPPER(''node'bog%'))) ORDER BY node_title ASC, node_title ASC LIMIT 0, 10 in /var/www/sites/telamenta-drupal5/includes/database.mysql.inc on line 172.

Seems as if the 'b' is substituted by 'node' instead of %.

Comments

arso’s picture

Hi, for the same error I have temporary fixed the problem. You can see the post http://drupal.org/node/268904#comment-876944

Regards.

diricia’s picture

Status: Active » Closed (fixed)

Corrected in later versions