DB error fix on search for account_type_code or account_code

Fix For https://issues.civicrm.org/jira/browse/CRM-15538