首页  >  文章  >  后端开发  >  discuz x2.5中关于discuz_database类的有关问题

discuz x2.5中关于discuz_database类的有关问题

WBOY
WBOY原创
2016-06-13 12:47:38849浏览

discuz x2.5中关于discuz_database类的问题

<br />
	public static function delete($table, $condition, $limit = 0, $unbuffered = true) {<br />
		if (empty($condition)) {<br />
			return false;<br />
		} elseif (is_array($condition)) {<br />
			if (count($condition) == 2 && isset($condition['where']) && isset($condition['arg'])) {<br />
				$where = self::format($condition['where'], $condition['arg']);<br />
			} else {<br />
				$where = self::implode_field_value($condition, ' AND ');<br />
			}<br />
		} else {<br />
			$where = $condition;<br />
		}<br />
		$limit = dintval($limit);<br />
		$sql = "DELETE FROM " . self::table($table) . " WHERE $where " . ($limit ? "LIMIT $limit" : '');<br />
		return self::query($sql, ($unbuffered ? 'UNBUFFERED' : ''));<br />
	}<br />
该方法中的$where = self::format($condition['where'], $condition['arg']);21.$condition['arg']是什么意思指什么?<br />

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn