Permalink
Browse files

fix: use count to instead of result[0]['COUNT(0)']

  • Loading branch information...
XadillaX committed Jan 19, 2016
1 parent 22ec1c2 commit c335b847cd03279a2504cc7068e68335c34b755e
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/query.js
@@ -719,8 +719,8 @@ Query.prototype.count = function(callback) {
count = parseInt(result[0]["COUNT(0)"]) || 0;
}

callback(undefined, result[0]["COUNT(0)"]);
promisor._onExecuteResult(undefined, result[0]["COUNT(0)"]);
callback(undefined, count);
promisor._onExecuteResult(undefined, count);
});

return promisor;

0 comments on commit c335b84

Please sign in to comment.