When I enable & use the CC search tool on a CC script which has multi-table joins enabled, and provide a search criteria, the search fails with an error! (Frank is used below!)
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 '' at line 1 SQL=SELECT `Members`.*, `Status`.`member_status_desc` AS `Status.member_status_desc`, `Committee`.`committee_name` AS `Committee.committee_name`, `Industry`.`industry_name` AS `Industry.industry_name`, `Jobclass`.`jobclass_name` AS `Jobclass.jobclass_name` FROM `eu_members` AS `Members` LEFT JOIN `eu_member_statuses` AS `Status` ON Members.status=Status.member_status LEFT JOIN `eu_committees` AS `Committee` ON Members.committee=Committee.committee LEFT JOIN `eu_industries` AS `Industry` ON Members.industry_id=Industry.industry_id LEFT JOIN `eu_jobclasses` AS `Jobclass` ON Members.jobclass_id=Jobclass.jobclass_id WHERE (UPPER(STATUS)!='D') AND (`first_name` LIKE '%Frank%' OR `last_name` LIKE '%Frank%' OR `email_address` LIKE '%Frank%' OR `status` LIKE '%Frank%' OR `committee` LIKE '%Frank%') ORDER BY `last_name`, `first_name` LIMIT 0,
Disable the multi-table joins, the search works, but returns results from a single table with many coded values which users cannot understand. The joins solve that. It also finds the occurrence of all matching criteria, often not in the column where the search is intended.
At present there is a single search tool for all fields. (Not desired, but worked enough to demonstrate & have management's blessing to proceed.)
In the near future, we want to implement, 9 search criteria inputs where one or multiple criteria can be input to find specific matches. The operators may be looking for members of specific first name, or last name, or e-mail address, or committee, or status, or industry, or job class, or active date or inactive date. (A MySQLi %LIKE% type of search where all characters of last name may not be known.)
My question, should I fix the present CC ability to search or abandon it & try to make the 9 column search? How would I do that?
Thanks in advance!
Roger