codeigniter-mongodb-library
codeigniter-mongodb-library copied to clipboard
How to take $lte on where with ObjectID
I wanted to see the number of objects created before the current _id.
db.CollectionName.find({_id: {$lte: ObjectId('60d72cb1faaeb52ac010d0ed')} }).count()
This will tell me how many records are created before this particular record. Any way to do this in this Library.
I am trying $query_count = $this->mongo_db->where("_id", $this->mongo_db->lte($store_id));
but it has an exception only float i can use not ObjectID.