PHP操作数据库:select 操作操作_PHP教程
程序员文章站
2022-04-25 10:33:13
...
$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