diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-13 06:44:31 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-13 06:44:31 +0000 |
commit | 85213d3bee5c4373f12378c3fa910f0e93e6d678 (patch) | |
tree | d97cce804430817ebc6217fb25fb69e09171bf50 /modules/profile/profile.admin.inc | |
parent | 83c97345e8eada544d7da4586e2c77db469ed5b1 (diff) | |
download | brdo-85213d3bee5c4373f12378c3fa910f0e93e6d678.tar.gz brdo-85213d3bee5c4373f12378c3fa910f0e93e6d678.tar.bz2 |
#279851 by catch, et al: Replace LOWER() with db_select() and LIKE() where possible.
Diffstat (limited to 'modules/profile/profile.admin.inc')
-rw-r--r-- | modules/profile/profile.admin.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc index 7503bcaa3..72708a55a 100644 --- a/modules/profile/profile.admin.inc +++ b/modules/profile/profile.admin.inc @@ -421,7 +421,12 @@ function profile_field_delete_submit($form, &$form_state) { */ function profile_admin_settings_autocomplete($string) { $matches = array(); - $result = db_query_range("SELECT category FROM {profile_field} WHERE LOWER(category) LIKE LOWER(:category)", 0, 10, array(':category' => $string . '%')); + $result = db_select('profile_field') + ->fields('profile_field', array('category')) + ->condition('category', db_like($string) . '%', 'LIKE') + ->range(0, 10) + ->execute(); + foreach ($result as $data) { $matches[$data->category] = check_plain($data->category); } |