Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8858901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:55:57+00:00 2026-06-14T14:55:57+00:00

[_id] => MongoId Object ( [$id] => 5090ace3788a466769b3804e ) [startdate] => MongoDate Object (

  • 0
[_id] => MongoId Object (
    [$id] => 5090ace3788a466769b3804e
)
[startdate] => MongoDate Object (
    [sec] => 1301616000
    [usec] => 0
)
[enddate] => MongoDate Object (
    [sec] => 1304121600
    [usec] => 0
)
[your_id] => 33902
[odd_blah] => blahblah
[cam_id] => 339
[cost] => 0.01
[iscurrent] => 
[damn_current] => Array (
)

$coll = $this->mongo_db->where('cam_id', 339)->get('collection_name);

This returns nothing. As you might notice I am using
https://github.com/alexbilbie/codeigniter-mongodb-library/tree/v2

I get an empty array. Can anyone help? This sounds primitive, but kind of stuck here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:55:58+00:00Added an answer on June 14, 2026 at 2:55 pm

    You’re very close, you need to put your where statement in an array.

    $coll = $this->mongo_db
        ->where(array('cam_id' => 339))
        ->get('collection_name');
    

    I’m assuming you’re using Alex Bilbie’s MongoDB CodeIgniter Library. His documentation is really out of date and it is more recommended to look at the comments of his source code for examples and the types of inputs that the functions require.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have nodes like this: [_id] => MongoId Object ( [$id] => 4e90cb3cd68417740c000017 )
Here's my array Array ( [_id] => MongoId Object ( [$id] => 4ff6e96bb0b4599016000006 )
I have a mongodb object as follows: array ( '_id' => new MongoId(4cc97fb0247ae8747ec5fefb), 'posts'
I have mongo collection array as below [_id] => MongoId Object ( [$id] =>
I have some mongoDB documents with the following structure: [_id] => MongoId Object (
Mongo make an array with date as key ? [_id] => MongoId Object (
Is there any one command in Mongoid to delete an object using id? Something
I have a Sinatra/Mongoid application and I noticed that my mongoid model/object does not
I've got an array of referenced objects in a Mongoid document. Using current_user.add_to_set(:whatever, @object.id)
I have the following MongoDB object stored in my Mongo database: array ( '_id'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.