Example #1
0
File: Mysql.php Project: kstep/pnut
 public function setDatabase($database)
 {
     if (!mysql_select_db($database)) {
         throw new Storage_Db_Mysql_Exception($this->_link);
     }
     return parent::setDatabase($database);
 }
Example #2
0
File: Tag.php Project: 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);
 }
Example #3
0
File: Table.php Project: kstep/pnut
 public function delete($condition)
 {
     return parent::delete($this->_table, $condition);
 }