Heim  >  Artikel  >  Backend-Entwicklung  >  discuz x2.5中关于discuz_database类的问题

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

WBOY
WBOYOriginal
2016-06-23 14:09:061046Durchsuche

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


回复讨论(解决方案)

数组里的一个键值

他应该 是这样的  delete删除方法  里面 肯定要条件 这个方法内部 最这个条件格式花下  在拼接成最后的sql  至于$condition['arg'] 你直接打印下 不就知道了 .....

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn