felixge/node-mysql — Issue #171: End Event
Author: jafar-
Created: 2012-02-29 05:10:15+00:00
State: open

Great module. Everything is working except the "End" event. I cannot get the database to tell me if there were any results. I am trying to check if there is a 'name' already in the database.

-Is there a known bug?
-Am I writing this correctly?
-Anyone else experiencing this?

//PREPARE QUERY
var query = sql.db.format('SELECT * FROM members WHERE name = ?',['someName']);

//QUERY
var results = sql.db.query(query);

//END EVENT
results.on('end',function(info){
console.log(info);
});