基于長春的招生管理信息系統(tǒng)開發(fā)與實(shí)現(xiàn)
from flask import Flask, request, jsonify
import pymysql
app = Flask(__name__)
# 連接到MySQL數(shù)據(jù)庫
conn = pymysql.connect(host='localhost', user='root', password='yourpassword', database='recruitment_system')
@app.route('/add_student', methods=['POST'])
def add_student():
data = request.get_json()
cursor = conn.cursor()
sql = "INSERT INTO students (student_id, name, contact_info) VALUES (%s, %s, %s)"
cursor.execute(sql, (data['student_id'], data['name'], data['contact_info']))
conn.commit()
return jsonify({"message": "Student added successfully"}), 201
if __name__ == '__main__':
app.run(debug=True)
]]>
本站知識(shí)庫部分內(nèi)容及素材來源于互聯(lián)網(wǎng),如有侵權(quán),聯(lián)系必刪!
讀過這篇文章的讀者還喜歡:
招生管理服務(wù)平臺(tái)助力大學(xué)教育發(fā)展聊聊師范大學(xué)里的招生管理信息系統(tǒng)青島陶醉中,探尋四川招生管理信息系統(tǒng)的魅力無錫視角下的招生管理信息系統(tǒng)與泰州教育發(fā)展搭建基于陜西招生網(wǎng)的高校信息管理系統(tǒng)招生管理系統(tǒng)中的科學(xué)方法與實(shí)踐基于江蘇地區(qū)的招生管理信息系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)西安高校招生系統(tǒng)的創(chuàng)新與實(shí)踐嗨起來!從烏魯木齊到哈爾濱的招生管理系統(tǒng)大揭秘關(guān)于“招生網(wǎng)”與“大模型”融合發(fā)展的探索