1

I am following code to display song list in alphabetical order

function getSongsIn(key, value)
{
    var query= "SELECT * FROM Songs where " + key + "=\"" + value + "\"ORDER BY title ;" ; 
    SongsDB.transaction(function (tx) {
        //tx.executeSql(query,[],showSongsIn,onError);
        tx.executeSql(query,[],showSongs,onError);
        }); 
}

Above code result in case sensitive arrangement. Can anyone suggest me to make it case insensitive?

Bob
  • 1,489
  • 1
  • 16
  • 28
  • 1
    This might be useful: http://stackoverflow.com/a/973777/464744 – Blender Sep 28 '12 at 08:47
  • Check http://stackoverflow.com/questions/2413427/how-to-use-sql-order-by-statement-to-sort-results-case-insensitive – niksvp Sep 28 '12 at 08:49
  • Check this http://stackoverflow.com/questions/10160556/mysql-query-force-case-sensitive-with-a-order-by-rand – Jobin Sep 28 '12 at 08:54

1 Answers1

2

This worked for me:

ORDER BY upper(title)
gbs
  • 3,529
  • 2
  • 20
  • 18