What i want to:
SELECT MAX(pieces) //(to a var variable)
FROM record
WHERE ip = :ipAddress AND filename_full = :filename
:ipAddress and filename come via the http...Thanks for the help
where I want to use:
mongoose.connect('mongodb://localhost:27017/newDB', function(err,db){
if(!err){
acl = new acl(new acl.mongodbBackend(mongoose.connection.db, 'acl_'));
acl.allow('guest', 'business', 'view');
console.log(acl);
var cursor = db.collection('record').find({ip: ipAddress, filename_full: filename});
cursor.each(function (err, doc) {
assert.equal(err, null);
if (doc != null) {
console.dir(doc);
} else {
console.log("Not found");
callback();
}
});*/
}
});