Query keywords with capitalization insensitive in Oracle

There is a case:the name of my song in Oracle is called “love
love”,and I need find it out whenever user query by “Love”,“love” or
“lOVe”,and so on.I used this sentance:
Song.find(:all,:conditions=>[‘lower(name) like ?’,’%’[email protected]+’%’])
It’s just fine in Oracle,but it cann’t work with MySQL.That is, when I
change my DB from Oracle to MySQL,I will need change my query
sentance,that’s bad! Is there some better way to finish my work?Thx!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs