涵盖医院全部科研活动的全方位科研项目管理系统
<?php
// 定义数据库连接信息
$servername = "localhost";
$username = "root";
$password = "your_password";
$dbname = "research_management";
// 创建连接
$conn = new mysqli($servername, $username, $password, $dbname);
// 检测连接
if ($conn->connect_error) {
die("连接失败: " . $conn->connect_error);
}
echo "连接成功";
// 创建科研项目表
$sql = "CREATE TABLE ResearchProjects (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
project_name VARCHAR(30) NOT NULL,
start_date DATE,
end_date DATE,
status VARCHAR(20),
description TEXT
)";
if ($conn->query($sql) === TRUE) {
echo "Table ResearchProjects created successfully";
} else {
echo "创建表错误: " . $conn->error;
}
// 关闭连接
$conn->close();
?>
Copyright © 医院科研管理系统