Inserting A Variable Into Sql Table
I cannot seem to get user entered data into a table and then printed. Here is my code thus far:
Solution 1:
I think you just need to change the way you're getting and inserting your values (also, you had a syntax error in the SQL on this line):
var input = document.getElementById('someId').value;
...
tx.executeSql('INSERT INTO LOGS (id, log) VALUES (1, ?)', [input]);
...
I think you can forget about the localStorage
variable altogether, unless you need to persist those values.
Post a Comment for "Inserting A Variable Into Sql Table"