comparison quotedb.tcl @ 110:4aa1e1d545ed

urllog and quotedb: Use SQL LIKE operator for username search terms to avoid unnecessary case-sensitivity.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 Sep 2011 21:19:50 +0300
parents 74cb254dbf09
children 593874678e45
comparison
equal deleted inserted replaced
109:74cb254dbf09 110:4aa1e1d545ed
414 set fpattern [string range $ftoken 1 end] 414 set fpattern [string range $ftoken 1 end]
415 415
416 if {$fprefix == "-"} { 416 if {$fprefix == "-"} {
417 lappend fpatlist "utext NOT LIKE '%[qdb_escape $fpattern]%'" 417 lappend fpatlist "utext NOT LIKE '%[qdb_escape $fpattern]%'"
418 } elseif {$fprefix == "%"} { 418 } elseif {$fprefix == "%"} {
419 lappend fpatlist "user='[qdb_escape $fpattern]'" 419 lappend fpatlist "user LIKE '[qdb_escape $fpattern]'"
420 } elseif {$fprefix == "@"} { 420 } elseif {$fprefix == "@"} {
421 # foo 421 # foo
422 } elseif {$fprefix == "+"} { 422 } elseif {$fprefix == "+"} {
423 lappend fpatlist "utext LIKE '%[qdb_escape $fpattern]%'" 423 lappend fpatlist "utext LIKE '%[qdb_escape $fpattern]%'"
424 } else { 424 } else {