//Create database connection
$conn=mysql_connect("localhost","arvin","123");
// Determine whether the data inventory connection is normal
if(!$conn)
{
die('Could not connect:'.mysql_error());
}
//Open the database
$selected=mysql_select_db("study",$conn);
//Write SQL statement
$sql1="select * from phone";
$result=mysql_query($sql1,$conn);
var_dump($result);
?>
I have never written a native database connection, but I feel that selecting a database is not used here