Hi, experts how to correct this code? I declare S1 = Mytable. when excecute the code below S1 would be the result. I want the result would be Mytable.
function create()
{
var S1 = "MyTable";
db.transaction(function (tx)
{
tx.executeSql('CREATE TABLE IF NOT EXISTS S1 (s_id INTEGER PRIMARY KEY ASC, id unique, firstName, familyName)');
});
alert("Successfully created!");
}
tx.executeSql('CREATE TABLE IF NOT EXISTS Mytable (s_id INTEGER PRIMARY KEY ASC, id unique, firstName, familyName)');
the thing I need is how to make the statement that would replace Mytable to S1 since S1 is variable. It is possible? thanks!