vendredi 8 janvier 2016

How access a particular column value in the result of select statement in sqlite

I have a join statement in sqlite and I want to print the result in a tabluar fashion.The following is my code

tx.executeSql('SELECT name, emp_id,dep FROM company inner join dept on comp.id=dept.id";', [], function (tx, results) {
var table=document.getElementById("mem_table");
 for(i=0;i<results.rows.length;i++)
{
var tr=document.createElement("tr");
for (j=0;j<(want to put column count of result set;j++)
{
var td=document.createElement("td");
//add column value to td?? how to do this
}


}

please help!!

Aucun commentaire:

Enregistrer un commentaire