php建立MySQL数据表

<?php

$connect = mysql_connect("127.0.0.1","root","");

mysql_select_db("bjh160303");

if($connect){

echo "链接成功";

}else{

echo "链接失败";

}

$building = "create table json(id INT PRIMARY KEY,title TEXT NOT NULL,price TEXT NOT NULL,author TEXT NOT NULL,date TEXT NOT NULL)";

$go = mysql_query($building);

mysql_close($connect);

?>

上一篇:新手入门Underscore.js 中文(template)


下一篇:防御XSS攻击的七条原则