Skip to content

Commit

Permalink
fix: use count to instead of result[0]['COUNT(0)']
Browse files Browse the repository at this point in the history
  • Loading branch information
XadillaX committed Jan 19, 2016
1 parent 22ec1c2 commit c335b84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/query.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -719,8 +719,8 @@ Query.prototype.count = function(callback) {
count = parseInt(result[0]["COUNT(0)"]) || 0; count = parseInt(result[0]["COUNT(0)"]) || 0;
} }


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


return promisor; return promisor;
Expand Down

0 comments on commit c335b84

Please sign in to comment.