These are chat archives for collectiveaccess/support

14th
Dec 2016
naeemmuhammad
@naeemmuhammad
Dec 14 2016 11:46

Hi,
We need some help in making searches on object_x_object relationship fields for a particular relationship type in Pawtucket2. We used “{{{ca_objects_x_objects.preferred_labels%restrictToRelationshipTypes=partOfSeries&width=210px}}}” display template to display a search field in the search form. When we make the search, we get some results however with the following error:


Something went wrong
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 'AND swi.field_num = '') AND swi.access = 0' at line 7 in /libis/CA/test/collectiveaccess/pa_cct-staging/releases/20161125130538/app/helpers/errorHelpers.php line 47:

In Db_mysqli->execute(Object DbStatement, Object DbStatement, ' INSERT INTO ca_sql_search_phrase_80ea2ee335b10af6a71d6a8fffe746b2 SELECT swi.index_id + 1, 1 FROM ca_sql_search_words sw INNER JOIN ca_sql_search_word_index AS swi ON sw.word_id = swi.word_id WHERE sw.word = ? AND swi.table_num = ? AND (swi.field_table_num = AND swi.field_num = '') AND swi.access = 0 ', Array(2), ) in DbStatement line 151
At DbStatement->executeWithParamsAsArray(Array(2)) in Db line 270
At Db->query(' INSERT INTO ca_sql_search_phrase_80ea2ee335b10af6a71d6a8fffe746b2 SELECT swi.index_id + 1, 1 FROM ca_sql_search_words sw INNER JOIN ca_sql_search_word_index AS swi ON sw.word_id = swi.word_id WHERE sw.word = ? AND swi.table_num = ? AND (swi.field_table_num = AND swi.field_num = '') AND swi.access = 0 ', 'ren', 57) in SqlSearch line 801
At WLPlugSearchEngineSqlSearch->_doQueriesForSqlSearch(Object Zend_Search_Lucene_Search_Query_Boolean, '57', 'ca_sql_search_search_final', 0, Array(2)) in SqlSearch line 369
At WLPlugSearchEngineSqlSearch->search('57', '(./partOfSeries:"ren wu zhuan")', Array(2), Object Zend_Search_Lucene_Search_Query_Boolean) in SearchEngine line 276
At SearchEngine->doSearch('((ca_objects_x_objects.preferred_labels/partOfSeries:"Ren wu zhuan"))', Object ObjectSearchResult, Array(4)) in ObjectSearch line 50
At ObjectSearch->search('((ca_objects_x_objects.preferred_labels/partOfSeries:"Ren wu zhuan"))', Array(4)) in BrowseEngine line 1878
At BrowseEngine->execute(Array(3)) in BaseBrowse line 48
At BaseBrowse->execute(Array(3)) in SearchController line 288
At SearchController->__call('objects', Array(1)) in RequestDispatcher line 273
At SearchController->objects() in RequestDispatcher line 273
At RequestDispatcher->dispatch(Array(2)) in AppController line 112
At AppController->dispatch(true) in index line 121

Any help to solve this problem?
Thanks.