代码php
$con = mysql_connect("localhost","root","xxh2011010015");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
// Create table in my_db database
mysql_select_db("my_db", $con) or die("数据库选择失败
");
$sql = "CREATE TABLE User
(
usrname varchar(15),
password varchar(15),
mail varchar(15)
)";
mysql_query($sql,$con) or die("表User创建失败");
mysql_close($con);
?>