コード例 #1
0
ファイル: tag.class.php プロジェクト: axelsimon/ampache
 /**
  * delete
  *
  * Delete the tag and all maps
  */
 public function delete()
 {
     $sql = "DELETE FROM `tag_map` WHERE `tag_map`.`tag_id`='" . $this->id . "'";
     Dba::write($sql);
     $sql = "DELETE FROM `tag` WHERE `tag`.`id`='" . $this->id . "'";
     Dba::write($sql);
     // Call the garbage collector to clean everything
     Tag::gc();
     parent::clear_cache();
 }
コード例 #2
0
ファイル: tag.class.php プロジェクト: nioc/ampache
 /**
  * delete
  *
  * Delete the tag and all maps
  */
 public function delete()
 {
     $sql = "DELETE FROM `tag_map` WHERE `tag_map`.`tag_id` = ?";
     Dba::write($sql, array($this->id));
     $sql = "DELETE FROM `tag_merge` " . "WHERE `tag_merge`.`tag_id` = ?";
     Dba::write($sql, array($this->id));
     $sql = "DELETE FROM `tag` WHERE `tag`.`id` = ? ";
     Dba::write($sql, array($this->id, $this->id));
     // Call the garbage collector to clean everything
     Tag::gc();
     parent::clear_cache();
 }
コード例 #3
0
ファイル: preference.class.php プロジェクト: nioc/ampache
 /**
  * update_all
  * This takes a preference id and a value and updates all users with the new info
  */
 public static function update_all($preference_id, $value)
 {
     $preference_id = Dba::escape($preference_id);
     $value = Dba::escape($value);
     $sql = "UPDATE `user_preference` SET `value`='{$value}' WHERE `preference`='{$preference_id}'";
     Dba::write($sql);
     parent::clear_cache();
     return true;
 }