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

Invalid query for session destroy. #6

Open
mdanilov opened this issue Mar 12, 2014 · 0 comments
Open

Invalid query for session destroy. #6

mdanilov opened this issue Mar 12, 2014 · 0 comments

Comments

@mdanilov
Copy link

this.getClient(function(err, client, done) {
  if (err) return fn(err);

  client.query('DELETE FROM ' + _this.table + ' WHERE sid = $2;', [ sid ], function(err) {
    done();
    if (err) return fn(err);
    fn();
  });
});

Postgres can't find $1 parameter and invoke error. If you replace $2 to $1 it will work.

Thanks.

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

1 participant