<null> values from server will be updated to string "null" into the websql db
Hello,
I just noticed that all my
On INSERT it works fine, because you use placeholder '?' in the INSERT statement.
But in the UPDATE statement you write the following in line 473 (_buildUpdateSQL):
for (var i = 0; i < nb; i++) {
sql += '"' + members[i] + '" = "' + values[i] + '"';
if (i < nb - 1) {
sql += ', ';
}
}
Here the
Could you please use also placeholders in UPDATE?
Best regards, Mario
Could you propose a pull request? Unfortunately, I am very busy...
Hi Samuel, It's just to inform you that my 2 way sync is working perfectly with MySQL. I use 2 indexes (one for the client DB and one for the server DB). I modifyed webSqlSync.js to handle inserted records directly into MySQL that have a null client id value. When I insert a record in webSQL (with the client), I use -1 in the "server" ID to inform the server adapter that's a record newly created with the app. -1 mean to do an INSERT INTO MySQL. You'll find my code on my GitHub webSqlApp. I think, it will answer a lot of questions from the community. Ciao! Alain from Montréal.
Great work Alain ! I will add a link to your project in the doc. Very helpful indeed.
Thanks
@SuperMario77 Could you propose a pull request for this modifications? Or just send me here the code you have modified. Thanks