为什么fetch_array() 得不到数据?
function query($sql) {
			$this->sql = $sql;
			$result = mysql_query($sql,$this->conn) or die(mysql_error());
			if (!$result) {
				$this->show("错误SQL语句",$sql);
			} else {
				$this->result = $result;
			}
		}
		function select($table, $columnName = "*", $condition = '') {
			$condition = $condition ? ' WHERE ' . $condition : NULL;
			$this->query("SELECT $columnName FROM $table $condition");
		}
		function fetch_array() {
			if(!mysql_fetch_array($this->result)){
				$this->show("错误执行");
			}else{
				return mysql_fetch_array($this->result);
			}
		}
------解决方案--------------------
function fetch_array() {
if(! $this->result){
  $this->show("错误执行");
}else{
  return mysql_fetch_array($this->$result);
} <div class="clear"></div>
                        
                        每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
                Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号