Welcome Guest, Not a member yet? Register   Sign In
LIKE without a wildcard
#1

[eluser]Cheater[/eluser]
http://codeigniter.com/bug_tracker/bug/8152/

Can someone confirm that that bug report is correct?

It is where you are trying to do a SQL LIKE query, without any wildcards.
CodeIgniter cannot currently do that. It must insert a wildcard.

Its needed when want to do a case-insensitive search in MySQL.
#2

[eluser]davidbehler[/eluser]
Can't you use
Code:
LCASE(col_1) = LCASE('abc')
instead of
Code:
col_1 LIKE 'abc'

Should be the same, or not?
#3

[eluser]Cheater[/eluser]
Functionality wise yes its equivalent, but worse performance wise.

LIKE 'abc' uses indexes for a case insensitive search while LCASE would require to make every individual row lower case and then do the comparison.
#4

[eluser]davidbehler[/eluser]
Ok, performance wise it suxx..you are right.
But those out there that don't want to edit core files could use that solution until the "bug" is fixed/the missing feature is added.




Theme © iAndrew 2016 - Forum software by © MyBB