• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LIKE without a wildcard


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.

Can't you use
LCASE(col_1) = LCASE('abc')
instead of
col_1 LIKE 'abc'

Should be the same, or not?

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.

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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.