php - NodeJS Get Two Rows With Different Data -
im using nodejs , need mysql rows different data counted (only numbers row):
numbers name 12345 | hello 12345 | hello 54151 | okay
i need these lines: 12345 | hello , 54151 | okay should get: 2, because 2 different lines.
what function this?
im using:
mysqlconnection.query('select count(distinct numbers) users distinctcount', function (err, row, fields) { if (err) { throw err; } else { console.log(row[0].distinctcount); } });
but logs: undefined.
you should use:
select count(distinct number) distinctcount users;
Comments
Post a Comment