Drupal core search works fine when searching for a single term, but when I try to search multiple terms I get this error:
PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT COUNT(*) AS expression FROM (SELECT i.sid AS sid FROM {search_index} i INNER JOIN {node} n ON n.nid = i.sid INNER JOIN {search_total} t ON i.word = t.word LEFT JOIN {node_comment_statistics} node_comment_statistics ON node_comment_statistics.nid = i.sid INNER JOIN {search_dataset} d ON i.sid = d.sid AND i.type = d.type WHERE (n.status = :db_condition_placeholder_0) AND( (i.word = :db_condition_placeholder_1) OR (i.word = :db_condition_placeholder_2) )AND (i.type = :db_condition_placeholder_3) AND (n.type NOT IN (:db_condition_placeholder_4)) AND( (d.data ILIKE :db_condition_placeholder_5 ESCAPE '\') AND (d.data ILIKE :db_condition_placeholder_6 ESCAPE '\') ) GROUP BY i.type, i.sid HAVING (COUNT(*) >= :matches) ) subquery; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => training [:db_condition_placeholder_2] => webinar [:db_condition_placeholder_3] => node [:db_condition_placeholder_4] => poll [:db_condition_placeholder_5] => % training % [:db_condition_placeholder_6] => % webinar % [:matches] => 2 ) in PagerDefault->execute() (line 74 of /var/www/html/community/includes/pager.inc).
Does anyone have any insight on how to resolve this or know of a replacement module? Thanks.
Comments
You need to fix your code so
as you aren't developing a module, this post is better served in the post installation forum. Please edit the opening post and move it. Thanks.Jaypan We build websites