Export SQLite result set into variable / string for email body

Export SQLite result set into variable / string for email body

Hi Everyone, 

I am developing on the iPhone using a combination of jquery, html and sqlite. I have ran into a slight problem and am hoping you may be able to help me out.

I want to carry out the following sql query

  1. db.transaction(function(transaction){
  2. transaction.executeSql("SELECT * FROM real ORDER BY id DESC;", [], function(transaction, result){ 
  3.  for (var i = 0; i < result.rows.length; i++) {

    var row = result.rows.item(i);


The table "real" will have multiple rows & 8 columns "a" "b" "c"......

I want retrieve all of this information  and then have it placed inside one variable so that I can then pass this to an email body for sending.

Can anyone help me out at all please ?

Cheers