Query keywords with capitalization insensitive in Oracle


#1

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 ?’,’%’+@keyword+’%’])
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!