I'm creating a simple counter app, and I'd like to aggregate who counted up how many times per user.
Is it possible to do something like count(id) in SQL?
monaca
How about the code below?
"·The name of the collection is tentatively placed as ""counters."""
"·The target of acquisition is the ""count"" field."
"·Only items with the ""count"" field 1 are retrieved, and the total is obtained by ""totalItems""."
var counters=monaca.cloud.Collection("counters");
counters.findMine('count==1', '' , {propertyNames:["count"]})
.done(function(result)
{
console.log('Total items found:'+result.totalItems);
})
.fail(function(err)
{
console.log("Err#"+err.code+":"+err.message);
});
© 2024 OneMinuteCode. All rights reserved.