Home >Backend Development >PHP Tutorial > discuz x2.5中关于discuz_database类的有关问题

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

WBOY
WBOYOriginal
2016-06-13 12:47:38854browse

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 />

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn