javascript - How to order SQLite database alphabetically -


i have sqlite database in french utf-8 encoding , trying organize categories in alphabetical order. setup looks like: http://i.imgur.com/cqnw1es.png

i tried add select distinct category 'main database' order name unfortunately did not display correctly. can tell me correct way alphabetize category column in abc order?

javascript:

function ondeviceready() { if (window.device.platform === 'ios' && parsefloat(window.device.version) >= 7.0)                 statusbar.overlayswebview(false); db = window.sqliteplugin.opendatabase({name: "treatfinder", bgtype: 1}); db.transaction(function(tx){                tx.executesql("select distinct category 'main database'",[],function(tx,res){                              //console.log("number of categories: " + res.rows.length);                              var len = res.rows.length;                              (var i=0; < len; = + 1) {                                  $("#allrepos").append("<li><a href='treatsymptoms.html?category=" + res.rows.item(i).category + "'>"                                                        + res.rows.item(i).category + "</a></li>");                               }                              $('#allrepos').listview('refresh');                               });                                                            }) 


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -