intekhabrizvi / Codeigniter-mongo-library

MongoDB Library for Codeigniter with advance features like aggregation, journal, write concern and query profiling

Home Page:http://intekhabrizvi.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in add index on collection

free-developers opened this issue · comments

Hello
Why do i cannot add index on collection?
The error is Index could not be created to MongoDB Collection because no keys were specified
My code is $this->mongo_db->add_index('omid','time');
When i use $this->mongo_db->add_index('omid',array('time' => "ASC"));
again have error Message: Undefined variable: command
Thank you guys