SQL transactions in JavaScript -


how perform transaction of sql in javascript. have connected db in javascript.

since have made connection database, have execute query follows:

var x = 8;     database_name.db.transaction(function(transaction){             transaction.executesql("select * table testid = ?", [x],              function (transaction, result){                  //write success function call here             }, //ondone function             function (transaction, error){                 //write fail function call here              }  //onfail function         );     }) 

as can see, passed variable x used include value instead of ?


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -