public function delete_by_uid($uid) { if (!$uid) { return null; } return XDB::delete($this->_table, XDB::field('uid', $uid)); }
public function delete_by_variable($pluginid, $variable) { if (!$pluginid || !$variable) { return; } XDB::delete($this->_table, XDB::field('pluginid', $pluginid) . ' AND ' . XDB::field('variable', $variable)); }
public function delete_by_tid($tids) { $tids = dintval($tids, true); if ($tids) { return XDB::delete($this->_table, XDB::field('tid', $tids)); } return 0; }
public function delete($val, $unbuffered = false) { $ret = false; if (isset($val)) { $this->checkpk(); $ret = XDB::delete($this->_table, XDB::field($this->_pk, $val), null, $unbuffered); $this->clear_cache($val); } return $ret; }
public function delete_none_threads() { return XDB::delete($this->_table, "threads='0'"); }
public function delete_by_bids($bids) { XDB::delete($this->_table, XDB::field('bid', $bids)); }
public function srdelete($val, $condition = '', $unbuffered = false) { $ret = false; if (isset($val)) { $this->checkpk(); $where = ''; if (empty($condition)) { $where = XDB::field($this->_pk, $val); } elseif (is_array($condition)) { $where = XDB::field($this->_pk, $val) . ' AND ' . self::implode($condition, ' AND '); } else { $where = XDB::field($this->_pk, $val) . ' AND ' . $condition; } $ret = XDB::delete($this->_table, $where, null, $unbuffered); $this->clear_cache($val); } return $ret; }
public function delete_by_groupids($groupids) { XDB::delete($this->_table, XDB::field('groupid', $groupids)); }
public function delete_by_module($module) { XDB::delete($this->_table, XDB::field('module', $module)); }
public function delete_by_tid($tids) { return !empty($tids) ? XDB::delete($this->_table, XDB::field('tid', $tids)) : false; }
public function move_thread_by_tid($tids, $source, $target) { $source = intval($source); $target = intval($target); if ($source != $target) { XDB::query('REPLACE INTO %t SELECT * FROM %t WHERE tid IN (%n)', array($this->get_table_name($target), $this->get_table_name($source), $tids)); return XDB::delete($this->get_table_name($source), XDB::field('tid', $tids)); } else { return false; } }
public function delete_by_fid($tableid, $fids, $unbuffered = false) { return XDB::delete(self::get_tablename($tableid), XDB::field('fid', $fids), 0, $unbuffered); }
public function delete($val, $unbuffered = false, $uid = 0) { $val = dintval($val, is_array($val) ? true : false); if ($val) { if ($uid) { $uid = dintval($uid, is_array($uid) ? true : false); } return XDB::delete($this->_table, XDB::field($this->_pk, $val) . ($uid ? ' AND ' . XDB::field('uid', $uid) : ''), null, $unbuffered); } return !$unbuffered ? 0 : false; }
public function delete_by_id($tableid, $idtype, $id) { return $this->_check_id($idtype, $id) ? XDB::delete($this->_get_table($tableid), XDB::field($idtype, $id)) : false; }