Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
user.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2007 at 03:08 UTC
Updated:
2 May 2007 at 04:15 UTC
This is a bit inefficient
$result = pager_query("SELECT * FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys);
while ($account = db_fetch_object($result)) {
$find[] = array('title' => $account->name, 'link' => url('user/'. $account->uid, array('absolute' => TRUE)));
}
The same patch applies to 6.x-dev
| Comment | File | Size | Author |
|---|---|---|---|
| user_search.patch | 697 bytes | lyricnz |
Comments
Comment #1
lyricnz commentedTo "code needs review"
Comment #2
lyricnz commentedI know this probably doesn't make a huge difference, but it does save up to 30KB of php<-->mysql per query (15 rows of 2KB)
Comment #3
killes@www.drop.org commentedthis should be good to go.
Comment #4
dries commentedCommitted. Thanks! Send us more patches. :-)
Comment #5
m3avrck commentedCan 5 get some love to??
Comment #6
drummSure, 5 can get some love.
Committed to 5.
Comment #7
drummComment #8
(not verified) commented