本文整理汇总了PHP中XDB::update方法的典型用法代码示例。如果您正苦于以下问题:PHP XDB::update方法的具体用法?PHP XDB::update怎么用?PHP XDB::update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XDB
的用法示例。
在下文中一共展示了XDB::update方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_by_pluginvarid
public function update_by_pluginvarid($pluginid, $pluginvarid, $data)
{
if (!$pluginid || !$pluginvarid || !$data || !is_array($data)) {
return;
}
XDB::update($this->_table, $data, XDB::field('pluginid', $pluginid) . ' AND ' . XDB::field('pluginvarid', $pluginvarid));
}
示例2: update_by_threadtableid
public function update_by_threadtableid($threadtableid, $data, $unbuffered = false, $low_priority = false)
{
if (empty($data)) {
return false;
}
return XDB::update($this->_table, $data, XDB::field('threadtableid', $threadtableid), $unbuffered, $low_priority);
}
示例3: update
public function update($tableid, $val, $data)
{
if (!$data) {
return;
}
return XDB::update($this->_get_table($tableid), $data, XDB::field($this->_pk, $val));
}
示例4: update_by_tid_action
public function update_by_tid_action($tids, $action, $data)
{
$tids = dintval($tids, true);
if (!empty($data) && is_array($data) && $tids) {
return XDB::update($this->_table, $data, XDB::field('tid', $tids) . ' AND ' . XDB::field('action', $action));
}
return 0;
}
示例5: update
public function update($val, $data, $unbuffered = false, $low_priority = false)
{
if (isset($val) && !empty($data) && is_array($data)) {
$this->checkpk();
$ret = XDB::update($this->_table, $data, XDB::field($this->_pk, $val), $unbuffered, $low_priority);
foreach ((array) $val as $id) {
$this->update_cache($id, $data);
}
return $ret;
}
return !$unbuffered ? 0 : false;
}
示例6: srupdate
public function srupdate($val, $data, $condition = '', $unbuffered = false, $low_priority = false)
{
if (isset($val) && !empty($data) && is_array($data)) {
$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::update($this->_table, $data, $where, $unbuffered, $low_priority);
foreach ((array) $val as $id) {
$this->update_cache($id, $data);
}
return $ret;
}
return !$unbuffered ? 0 : false;
}
示例7: update_archive
public function update_archive($fids)
{
return XDB::update('forum_forum', array('archive' => '0'), "fid NOT IN (" . dimplode($fids) . ")");
}
示例8: fixalbum
function fixalbum($bid, $data)
{
if (!is_array($data) || empty($data)) {
return null;
}
$condition = array();
$bid = dintval($bid, true);
$condition[] = XDB::field('bid', $bid);
return XDB::update($this->_table, $data, implode(' AND ', $condition));
}
示例9: update_by_bid
public function update_by_bid($bid, $data)
{
return XDB::update($this->_table, $data, XDB::field('bid', $bid));
}
示例10: update_by_groupid
public function update_by_groupid($groupid, $data)
{
return XDB::update($this->_table, $data, XDB::field('groupid', $groupid));
}
示例11: update_by_closed
public function update_by_closed($tids, $data, $tableid = 0)
{
$tids = dintval($tids, true);
if (!empty($data) && is_array($data)) {
$num = XDB::update($this->get_table_name($tableid), $data, XDB::field('closed', $tids), true);
if ($num) {
foreach ((array) $tids as $tid) {
$this->update_cache($tid, $data, $this->_cache_ttl);
}
}
return $num;
}
return 0;
}
示例12: update_fid_by_fid
public function update_fid_by_fid($tableid, $fid, $newfid, $unbuffered = false, $low_priority = false)
{
$where = array();
$where[] = XDB::field('fid', $fid);
$return = XDB::update(self::get_tablename($tableid), array('fid' => $newfid), implode(' AND ', $where), $unbuffered, $low_priority);
if ($return && $this->_allowmem) {
$updatefid = $this->fetch_cache('updatefid');
$updatefid[$fid] = array('fid' => $newfid, 'dateline' => TIMESTAMP);
$this->store_cache('updatefid', $updatefid);
}
return $return;
}
示例13: fix_update_block
public function fix_update_block($hash, $data)
{
return XDB::update($this->_blockstyletable, $data, XDB::field('hash', $hash));
}