数据库:PHP实验报告

本文详细描述了如何使用SQLDDL语句创建六个相关表格,并通过PHP实现TableList.php、show_tables.php、INSERT.php、DELETE.php和CHANGE.php页面,展示数据库表的操作,包括查询、插入、更新和删除记录。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Use the following SQL DDL statements to create the six tables required for this project. Note that you need to use the exact statements as shown below to ensure that the instructor can test your programs using the instructor’s data later. Please also note that the tables are created in certain order such that by the time when a foreign key needs to be created, the corresponding primary key has already been created.

1.创建相关表格:

(1)创建employees表格:

(2)创建customers表格:

(3)创建suppliers表格:

(4)创建products表格:

(5)创建purchases表格:

(6)创建logs表格:

(7)向表格中加入具体数据:

2.创建TableList.php实现一个页面显示所有表格:

(1)php代码

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示所有表格</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            margin: 20px;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
            width: 200px; /* 设置页面宽度 */
            height: 320px; /* 设置页面高度 */
        }
        h2 {
            color: #333;
        }
        a {
      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值