Example #1
0
 protected function getConnection()
 {
     if (is_null($this->_conn)) {
         $this->_conn = KDGDatabase::create();
     }
     return $this->_conn;
 }
Example #2
0
 public static function testSelectQuery()
 {
     $objects = KDGDatabase::create()->from('page_category pc')->limit(2)->orderBy('pc.id DESC')->debug(false)->execute();
     $objects = self::create()->select('title, slug, created_at')->from('page_category pc')->execute();
     p($objects, 1);
 }
Example #3
0
 public static function getQuery()
 {
     return KDGDatabase::create()->entity('product')->from('product p');
 }
Example #4
0
 public static function getQuery()
 {
     return KDGDatabase::create()->entity('category')->from('category ca');
 }