<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> MySQL_Php.php </title>
<meta charset="UTF-8">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php
$conn=@mysql_connect("localhost","root","123") or die("连接错误");
//mysql_select_db("test");
mysql_select_db("test",$conn);
$sql="INSERT INTO `test`.`stuinfo` (`id`, `name`, `age`) VALUES ('7', 'xiao7', '7')";
//$ret=mysql_query($sql);
$ret=mysql_query($sql,$conn);
var_dump($ret);
?>
</body>
</html>
boolean true
boolean false