sidorares/nodejs-mysql-native — Issue #49: Problem with SUM in mysql query
Author: gotha
Created: 2011-11-14 11:21:07+00:00
State: open

Hi, I don`t know if it is a bug or I`m doing something wrong.
Here is my code:

var db = require("mysql-native").createTCPClient();
db.auto_prepare = true;
db.auth("thunderwar", "root", "");

If I try to execute this:
var res = db.query(" SELECT id FROM users WHERE x = 'y' ");
everything is ok, but if I try
var res = db.query(" SELECT SUM(id) FROM users WHERE x = 'y' ");
there is an error such as:

.......\mysql-native\lib\mysql-native\commands\query.js:94
return type_parsers\[t\](str, t);
\^
TypeError: Property '246' of object #