How to start work MongoDB with php kohana framework -
i'm developing application using php kohana framework using mongodb. i've got link mongodb module suitable framework. per instructions given i've configured module application. i'm sticking here not able proceed further development work. mongodb based queries not able use module. following code getting error me while selecting single document 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 cms content*/ public function getcmscontent($content,$default_companyid="") { $cms_result = $this->mongo_db->findone('cms'); return $cms_result; } }
can me proceed further.
$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 method works me after several hours spent on issue.
Comments
Post a Comment