sugarcrm モジュールの検索機能に問題があります。フィールド ボックスの例で常に%-signを使用します。 %johnを使用して検索結果を表示します。%john ではなく john のみが必要です。
メソッドで /modules/Accounts/Account.php のファイルを編集しました:
function build_generic_where_clause ($the_query_string) {
$where_clauses = Array();
$the_query_string = $GLOBALS['db']->quote($the_query_string);
array_push($where_clauses, "accounts.name like '%$the_query_string%' ");
if (is_numeric($the_query_string)) {
array_push($where_clauses, "accounts.phone_alternate like '%$the_query_string%'");
array_push($where_clauses, "accounts.phone_fax like '%$the_query_string%'");
array_push($where_clauses, "accounts.phone_office like '%$the_query_string%'");
}
/modules/Accounts/metadata/SearchFields.php を編集します。
'name' => array( 'query_type'=>'default', 'operator' => 'like'),
しかし、常に失敗します。これに対する解決策はありますか?
解決
config.php を編集して追加しました
'search_wildcard_infront' => true
よろしく、 ランプパック