6.0.0-git
2021-01-18

[#2030] SQL module's LIKE operator broken if LHS contains uppercase characters
Summary SQL module's LIKE operator broken if LHS contains uppercase characters
Queue Horde Framework Packages
Type Bug
State Resolved
Priority 1. Low
Owners selsky (at) columbia (dot) edu
Requester selsky (at) columbia (dot) edu
Created 2005-05-25 (5717 days ago)
Due
Updated 2005-05-25 (5717 days ago)
Assigned 2005-05-25 (5717 days ago)
Resolved 2005-05-25 (5717 days ago)
Milestone
Patch No

History
2005-05-25 16:10:38 Matt Selsky Comment #3
State ⇒ Resolved
Reply to this comment
Fixed in 3.0.5 and HEAD.
2005-05-25 15:38:56 Chuck Hagenbuch Comment #2
Assigned to Matt Selsky
State ⇒ Feedback
Reply to this comment
It looks like I wasn't seeing a different between the two; the log 
doesn't have anything about a problem. I think it'll be fine.
2005-05-25 10:20:29 Matt Selsky Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ SQL module's LIKE operator broken if LHS contains uppercase characters
Queue ⇒ Horde Framework Packages
Reply to this comment
I'm using Kronolith (with an Oracle backend) to search for events with 
title "Meeting".  This generates SQL similar to:



select * from kronolith_events where event_title like lower('%Meeting%');



This returns no results since my events use "Meeting" with a capital 
"M" and we search for '%meeting%' essentially.



framework/SQL/SQL.php says:



  case 'LIKE':

             if ($dbh->phptype == 'pgsql') {

                 $query = '%s ILIKE %s';

             } else {

                 $query = '%s LIKE LOWER(%s)';

             }



Why was the LOWER() function removed from the LHS in 1.20?



http://cvs.horde.org/diff.php/framework/SQL/SQL.php?r1=1.19&r2=1.20&ty=u



Any reason not revert that?

Saved Queries