Ejemplo n.º 1
0
 public function delete_by_uid($uid)
 {
     if (!$uid) {
         return null;
     }
     return XDB::delete($this->_table, XDB::field('uid', $uid));
 }
Ejemplo n.º 2
0
 public function delete_by_variable($pluginid, $variable)
 {
     if (!$pluginid || !$variable) {
         return;
     }
     XDB::delete($this->_table, XDB::field('pluginid', $pluginid) . ' AND ' . XDB::field('variable', $variable));
 }
Ejemplo n.º 3
0
 public function delete_by_tid($tids)
 {
     $tids = dintval($tids, true);
     if ($tids) {
         return XDB::delete($this->_table, XDB::field('tid', $tids));
     }
     return 0;
 }
Ejemplo n.º 4
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'");
 }
Ejemplo n.º 6
0
 public function delete_by_bids($bids)
 {
     XDB::delete($this->_table, XDB::field('bid', $bids));
 }
Ejemplo n.º 7
0
 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));
 }
Ejemplo n.º 9
0
 public function delete_by_module($module)
 {
     XDB::delete($this->_table, XDB::field('module', $module));
 }
Ejemplo n.º 10
0
 public function delete_by_tid($tids)
 {
     return !empty($tids) ? XDB::delete($this->_table, XDB::field('tid', $tids)) : false;
 }
Ejemplo n.º 11
0
 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;
     }
 }
Ejemplo n.º 12
0
 public function delete_by_fid($tableid, $fids, $unbuffered = false)
 {
     return XDB::delete(self::get_tablename($tableid), XDB::field('fid', $fids), 0, $unbuffered);
 }
Ejemplo n.º 13
0
 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;
 }
Ejemplo n.º 14
0
 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;
 }