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

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -