require_once('login_109db.php');
$conn=new mysqli($hn,$un,$pw,$db);
if($conn->conn_error)die("Error! DataBase link error.
");
else echo "Connect Success!!
";
//重新命名表單
//$query="ALTER TABLE student RENAME stu;";
//變更欄位名稱
//$query="ALTER TABLE student change id sid SERIAL NOT NULL;";
//新增欄位
//$query="ALTER TABLE student ADD (stu_id VARCHAR(6) NOT NULL, stu_seat SMALLINT NOT NULL);";
//修改欄位資料型態
//$query="ALTER TABLE student MODIFY stu_seat INT NOT NULL;";
//移除欄位
//$query="ALTER TABLE student DROP stu_seat;";
//刪除資料表
//$query="DROP TABLE student;";
$result=$conn->query($query);
if (!$result) die("Error! 資料表建立失敗.
");
else echo "資料表修改成功\n";
//$rows=$result->num_rows;
$conn->close();