public function setDatabase($database) { if (!mysql_select_db($database)) { throw new Storage_Db_Mysql_Exception($this->_link); } return parent::setDatabase($database); }
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); }
public function delete($condition) { return parent::delete($this->_table, $condition); }