Home >Backend Development >PHP Tutorial >php数据库返回值有关问题

php数据库返回值有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 11:44:49921browse

php数据库返回值问题
本人刚开始学习PHP

<html><br />	<body><br />	<?php<br />		$con = mysql_connect("127.0.0.1","root","root");<br />		if(!con){<br />			die('Could not connect:'.mysql_error());<br />		}else{<br />			mysql_select_db("test",$con);<br />			$result = mysql_query("select * from user");<br />			echo "<table border='1'>";<br />				while($row = mysql_fetch_array($result)){<br />					echo "<tr>";<br />						echo "<td>" . count($row) . "</td>";<br />						echo "<td>" . $row[0] . "</td>";<br />						echo "<td>" . $row[1] . "</td>";<br />						echo "<td>" . $row[2] . "</td>";<br />					echo "</tr>";<br />				}<br />			echo "</table>";<br />			mysql_close($con);<br />		}<br />	?><br />	</body><br /></html>

我的数据库中就只有id,username,pwd3个字段为什么
echo "

" . count($row) . "";统计的count($row)的长度为6啊
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