I have a table view with two exposed filters to search by name and category against content type "Company." On the page table view, it lists all these Companys under a certain vocabulary. You can then narrow down by name and specific term with the exposed filter with the table updating accordingly. Standard stuff.

There is one company with title "The Bistro". If I type in the search box "bis" or "bistro" to see if it comes up I get two massive database errors.



    * 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'is%'))' at line 1 query: SELECT count(DISTINCT(node.nid)) FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_data term_data ON term_node.tid = term_data.tid AND term_data.vid IN ('3') LEFT JOIN content_type_company node_data_field_featured ON node.vid = node_data_field_featured.vid LEFT JOIN content_type_review node_data_field_overall ON node.vid = node_data_field_overall.vid LEFT JOIN content_type_review node_data_field_quality ON node.vid = node_data_field_quality.vid LEFT JOIN content_field_service node_data_field_service ON node.vid = node_data_field_service.vid LEFT JOIN content_type_review node_data_field_cost ON node.vid = node_data_field_cost.vid LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid WHERE (node.status = '1') AND (term_node.tid IS NOT NULL) AND (term_data.tid IS NOT NULL) AND (UPPER(node.title) LIKE UPPER(''node'is%')) in /home/public_html/site.com/includes/database.mysql.inc on line 174.

    * 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'is%')) GROUP BY node.nid, node_data_field_featured_field_featured_value, no' at line 1 query: SELECT DISTINCT(node.nid), node_data_field_featured.field_featured_value AS node_data_field_featured_field_featured_value, node.title AS node_title, node.changed AS node_changed, node_data_field_overall.field_overall_rating AS node_data_field_overall_field_overall_rating, node_data_field_overall.field_overall_target AS node_data_field_overall_field_overall_target, node_data_field_quality.field_quality_rating AS node_data_field_quality_field_quality_rating, node_data_field_quality.field_quality_target AS node_data_field_quality_field_quality_target, node_data_field_service.field_service_rating AS node_data_field_service_field_service_rating, node_data_field_service.field_service_target AS node_data_field_service_field_service_target, node_data_field_cost.field_cost_rating AS node_data_field_cost_field_cost_rating, node_data_field_cost.field_cost_target AS node_data_field_cost_field_cost_target, node_comment_statistics.comment_count AS node_comment_statistics_comment_count FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_data term_data ON term_node.tid = term_data.tid AND term_data.vid IN ('3') LEFT JOIN content_type_company node_data_field_featured ON node.vid = node_data_field_featured.vid LEFT JOIN content_type_review node_data_field_overall ON node.vid = node_data_field_overall.vid LEFT JOIN content_type_review node_data_field_quality ON node.vid = node_data_field_quality.vid LEFT JOIN content_field_service node_data_field_service ON node.vid = node_data_field_service.vid LEFT JOIN content_type_review node_data_field_cost ON node.vid = node_data_field_cost.vid LEFT JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid WHERE (node.status = '1') AND (term_node.tid IS NOT NULL) AND (term_data.tid IS NOT NULL) AND (UPPER(node.title) LIKE UPPER(''node'is%')) GROUP BY node.nid, node_data_field_featured_field_featured_value, node_title ORDER BY node_data_field_featured_field_featured_value DESC, node_title ASC, node_title ASC LIMIT 0, 50 in /home/public_html/site.com/includes/database.mysql.inc on line 174.

However, if I type in "Bistro" with a capital "B", it returns correctly. I can type in other partial words just fine. For example, there is a node called "El Mazatlan", and when I type in "maz" it updated the table to show this result correctly.

But if the query ever starts with a lowercase "b", it gives the two errors up above. Very strange.

I attached the exported view if you'd like to see.

There is also a weird error I'll mention here since they might be related about case sensitivity. Everything returns correctly in the view regardless of case in the exposed filter, except for one company named "Double Dogs". I if include one of the d's in the query, it has to be a capital. So "double" will not return anything but "Double" does. This is NOT true with any other result.

Thanks for the help.

CommentFileSizeAuthor
viewexport.txt4.03 KBjazzdrive3

Comments

merlinofchaos’s picture

Upgrade to the 1.x-dev version, where this bug is fixed.

esmerel’s picture

Status: Active » Closed (fixed)

fixed in dev