PHP操作数据库:select 操作操作
程序员文章站
2024-01-29 09:12:22
...
$conn= mysql_connect("127.0.0.1","root","root");
mysql_select_db("tools",$conn);
$result= mysql_query("select * from admin");
while($row=mysql_fetch_array($result))
{
echo $row["name"]." ".$row["pass"];
echo"";
}
mysql_close($conn);
mysql_select_db("tools",$conn);
$result= mysql_query("select * from admin");
while($row=mysql_fetch_array($result))
{
echo $row["name"]." ".$row["pass"];
echo"";
}
mysql_close($conn);
?>
菲 blog