sql - How to get number of element in table if it is exist in data base .? -


i need count number of element in row if exist in data base . query not running.i using sqlite in phonegap

        db.transaction(function (tx) {   tx.executesql('select count(*) b)', [],    // tx.executesql('select exists(select *  b)', [],               function(tx, results) {                t=results.rows.length;                alert(t) });     }); 

actually have 1 table in have tables name .i need count elements in each table

function getalltabledata(tx) {      tx.executesql('select * casetable', [], querysuccess, errorcb); }   function querysuccess(){ (var = 0; < len; i++) {     alert(result.rows.item(0).casename)         db.transaction(function (tx) {   tx.executesql('select * "'+result.rows.item(0).casename+'"', [],    // tx.executesql('select exists(select *  b)', [],               function(tx, results) {                t=results.rows.length;                alert(t) });     });  }  } 


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -