This query:
client.query({
text: "SELECT * FROM users WHERE provider = ? AND remote_id = ?",
values: [JSONuser.provider, JSONuser.remote_id]
},
function(err, result) {
...
})
Fails with syntax error at or near "AND".
I’m unable to figure out why. Been programming all day. I think it’s simple and I’m just tired.
Edit: Using https://github.com/brianc/node-postgres
Which library are you using? I assumed it’s Javascript and node.js. According to the docs(https://github.com/brianc/node-postgres/blob/master/README.md) It seems that you should use
$1,$2for bind variables instead of?