本文整理汇总了PHP中XDB::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP XDB::delete方法的具体用法?PHP XDB::delete怎么用?PHP XDB::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XDB
的用法示例。
在下文中一共展示了XDB::delete方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete_by_uid
public function delete_by_uid($uid)
{
if (!$uid) {
return null;
}
return XDB::delete($this->_table, XDB::field('uid', $uid));
}
示例2: delete_by_variable
public function delete_by_variable($pluginid, $variable)
{
if (!$pluginid || !$variable) {
return;
}
XDB::delete($this->_table, XDB::field('pluginid', $pluginid) . ' AND ' . XDB::field('variable', $variable));
}
示例3: delete_by_tid
public function delete_by_tid($tids)
{
$tids = dintval($tids, true);
if ($tids) {
return XDB::delete($this->_table, XDB::field('tid', $tids));
}
return 0;
}
示例4: delete
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;
}
示例5: delete_none_threads
public function delete_none_threads()
{
return XDB::delete($this->_table, "threads='0'");
}
示例6: delete_by_bids
public function delete_by_bids($bids)
{
XDB::delete($this->_table, XDB::field('bid', $bids));
}
示例7: srdelete
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;
}
示例8: delete_by_groupids
public function delete_by_groupids($groupids)
{
XDB::delete($this->_table, XDB::field('groupid', $groupids));
}
示例9: delete_by_module
public function delete_by_module($module)
{
XDB::delete($this->_table, XDB::field('module', $module));
}
示例10: delete_by_tid
public function delete_by_tid($tids)
{
return !empty($tids) ? XDB::delete($this->_table, XDB::field('tid', $tids)) : false;
}
示例11: move_thread_by_tid
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;
}
}
示例12: delete_by_fid
public function delete_by_fid($tableid, $fids, $unbuffered = false)
{
return XDB::delete(self::get_tablename($tableid), XDB::field('fid', $fids), 0, $unbuffered);
}
示例13: delete
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;
}
示例14: delete_by_id
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;
}