0

I'm currently developing the application using php Kohana framework using MongoDB. I've got this link for MongoDB module suitable for this framework. As per instructions given I've configured the module with application. But I'm sticking here not able to proceed further development work. MongoDB based queries are not able use with this module. Following the code getting error to me while selecting single document from the collection.

 <?php defined('SYSPATH') OR die('No Direct Script Access');
    Class Model_Cms extends Model
    {
        public function __construct()
        {
            $this->mongo_db = MangoDB::instance('default');
        }

        /*Get the CMS Content*/
        public function getcmscontent($content,$default_companyid="")
        {
          $cms_result = $this->mongo_db->findOne('cms');
            return $cms_result;
        }
    }

enter image description here

Can anyone help to me proceed further.

Braiam
  • 1
  • 11
  • 47
  • 78
sankar muniyappa
  • 356
  • 5
  • 14

1 Answers1

0
$cms_result = $this->mongo_db->find_one(MDB_CMS,array('type'=>1,'status'=>1,'menulinks.menu_link'=>$content),array('content','meta_keyword','meta_title','meta_description','menu'));

I've used this method its works for me after several hours spent on this issue.

sankar muniyappa
  • 356
  • 5
  • 14