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);

?>

posted @ 2016-09-04 17:40  夕阳下的小老头儿  阅读(142)  评论(0编辑  收藏  举报