Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using update function #23

Open
TaffarelXavier opened this issue Oct 27, 2019 · 1 comment
Open

Error when using update function #23

TaffarelXavier opened this issue Oct 27, 2019 · 1 comment

Comments

@TaffarelXavier
Copy link

There is an error trying to update some data

var sqlite = require("sqlite-sync"); //requiring

//Connecting - if the file does not exist it will be created
sqlite.connect("C:/Users/Taffarel/AppData/Local/codenotetx/notes_db.db");

// var rows = sqlite.run("SELECT * FROM users;");

var nome = "My Name";
var id = 1;

sqlite.run("UPDATE users SET name = ? WHERE id = ?;", [nome, id], function(ok) {
  console.log(ok); //not return true if success, alws zero (false)
  var rows = sqlite.run("SELECT * FROM users WHERE id = ?", [id]);
  console.log(rows);
});

sqlite.close();

But when I open SQLite Studio, the data be updated.
@buaaluwentao
Copy link

the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants