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
?when I should be using$1, $2, .... Will verify tomorrow. I'm using github.com/brianc/node-postgres which does support prepared statements.