我的php查询mysql为什么错了
</head><body><?php$conn=mysql_connect("localhost","root","03470347");mysql_select_db(...
</head><body>
<?php
$conn=mysql_connect("localhost","root","03470347");
mysql_select_db("system",$conn);
mysql_query("set names utf8");
$arr=mysql_query("select* from student where num >$_POST[num]",$conn);
while($result=mysql_fetch_assoc($arr)){
?>
<tr>
<td height="200"><?php echo $result['num'];?> </td>
<td height="200"><?php echo $result['name'];?> </td>
<td height="200"><?php echo $result['sex'];?> </td>
<td height="200"><?php echo $result['department'];?> </td>
</tr>
<?php
}
?>
</body>
</html> 展开
<?php
$conn=mysql_connect("localhost","root","03470347");
mysql_select_db("system",$conn);
mysql_query("set names utf8");
$arr=mysql_query("select* from student where num >$_POST[num]",$conn);
while($result=mysql_fetch_assoc($arr)){
?>
<tr>
<td height="200"><?php echo $result['num'];?> </td>
<td height="200"><?php echo $result['name'];?> </td>
<td height="200"><?php echo $result['sex'];?> </td>
<td height="200"><?php echo $result['department'];?> </td>
</tr>
<?php
}
?>
</body>
</html> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询