Skip to content

Commit

Permalink
Pass two values to statement
Browse files Browse the repository at this point in the history
  • Loading branch information
njenkins committed Mar 13, 2016
1 parent 3c4c9e1 commit 5de2887
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.js
Expand Up @@ -15,8 +15,8 @@ function initDatabase(callback) {

function updateRow(db, values) {
// Insert some data.
var statement = db.prepare("INSERT INTO data(title, url) VALUES (?)");
statement.run(values[0]+','+values[1]);
var statement = db.prepare("INSERT INTO data(title, url) VALUES (?, ?)");
statement.run(values);
statement.finalize();
}

Expand Down

0 comments on commit 5de2887

Please sign in to comment.