protected function getConnection() { if (is_null($this->_conn)) { $this->_conn = KDGDatabase::create(); } return $this->_conn; }
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); }
public static function getQuery() { return KDGDatabase::create()->entity('product')->from('product p'); }
public static function getQuery() { return KDGDatabase::create()->entity('category')->from('category ca'); }