示例#1
0
文件: Mysql.php 项目: kstep/pnut
 public function setDatabase($database)
 {
     if (!mysql_select_db($database)) {
         throw new Storage_Db_Mysql_Exception($this->_link);
     }
     return parent::setDatabase($database);
 }
示例#2
0
文件: Tag.php 项目: kstep/pnut
 public static function getTagsCloud(Storage_Db $db, $objtype = null, $limit = 0, $offset = 0, $order = "")
 {
     $result = $db->select('tags LEFT JOIN tag_relations ON (tags.id = tag_relations.tag_id)', "tags.*, COUNT(tag_relations.tag_id) AS total", $objtype === null ? null : array('obj_type' => $objtype), $limit, $offset, $order, "tags.id");
     return new Model_List_Tag($db, $result);
 }
示例#3
0
文件: Table.php 项目: kstep/pnut
 public function delete($condition)
 {
     return parent::delete($this->_table, $condition);
 }