我想通过 mysql 表中的循环插入数据,但它只插入循环执行的时间,我想在我的表中插入 500 次相同的数据下面是代码提前谢谢
enter code here
<html>
<head>
</head>
<body>
<div>
<?php
$con=mysqli_connect("localhost","root","khan","first");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
for($i=1;$i<500;$i++)
{
$sql="INSERT INTO bio(name, fathername , address) VALUES('khan','khan','khan')";
echo "Number " . $i . "<br>";
}
if (!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($con));
}
mysqli_close($con);
?>
</div>
</body>
</html>