0

Is it possible to perform case-insensitive query for SugarCRM get_entry_list method call?

Currently I have:

$email = abc@test.com;
$get_entry_list = array(
    'session' => 'sugar_session_id',
    'module_name' => 'sugarUser',
    'query' => "ea_su_second_email_c='".$email."'",
    'order_by' => "",
    'offset' => 0,
    'select_fields' => array('id','first_name','last_name','ea_su_second_email_c'),
    'max_results' => 50,
    'deleted' => 0,
    'favorites' => false,
); 

I want this query to return no result if

$email = Abc@test.com; // A as capital

Is it possible?

Jose Ricardo Bustos M.
  • 8,016
  • 6
  • 40
  • 62
  • If you want abc@test.com to return a result, and Abc@test.com to return NO result you want a case-sensitive search. You may want to edit the title and description. – Mathieu Fortin Sep 30 '15 at 16:43

1 Answers1

0

From what I remember in Sugar CRM case-sensitivity/insensitivity is delegated to the underlying database configuration. By default, in MySQL/MSSQL your searches will be case insensitive while in Oracle they will be case-sensitive.

For Oracle there seems to be a switch to toggle case insensitivity:

$sugar_config['oracle_enable_ci'] = true;

For the other databases you should refer to their documentation.

For Mysql you can refer to this question: Case Sensitive collation in MySQL

Community
  • 1
  • 1
Mathieu Fortin
  • 1,048
  • 7
  • 17