补全:建一张留言表
(每道题开头都有同一段:open_db() 建一个内存 SQLite 库、含 users / notes / files 三张表、交回连接;执行 SQL 用 conn.execute(SQL, 参数元组),取一行用 .fetchone()、取全部用 .fetchall()、新行主键用 .lastrowid。判题机自带 sqlite3。)
补全 make_db 里建 notes 表那句:id 是自增主键、还有 uid 和 text 两列。
(每道题开头都有同一段:open_db() 建一个内存 SQLite 库、含 users / notes / files 三张表、交回连接;执行 SQL 用 conn.execute(SQL, 参数元组),取一行用 .fetchone()、取全部用 .fetchall()、新行主键用 .lastrowid。判题机自带 sqlite3。)
补全 make_db 里建 notes 表那句:id 是自增主键、还有 uid 和 text 两列。
全部评论