DB SQLite – Direct execution of Sql

02/09/2012 § Leave a comment

The tutorials on official web page http://www.phonegap.com tells not too much about the possibilities of DB use. As  it was given an example of db with parsing of variables today we will post a post on direct execution of sql.

I had used a lot of time understanding the idea of the operation and here is a way of easy sql statement on PhoneGap:

function NAMEofFUNCTION(db)

{

    db.transaction( function (transaction)) {

        transaction.executeSql(“UPDATE table set column1=? where id=?”, [2, 1]);

    }

}

We do hope it will be useful for some of you !!! or maybe you find a better solution and share it here as a reply. We would appreciate it. Good luck.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading DB SQLite – Direct execution of Sql at EPILEPSY APP.

meta

%d bloggers like this: