Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion csv_DB.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
CodeCraft PMS Project
파일명 : csv_DB.py
마지막 수정 날짜 : 2025/02/13
마지막 수정 날짜 : 2025/03/23
"""

import pymysql
Expand Down Expand Up @@ -312,3 +312,20 @@ def fetch_csv_history(pid):
finally:
cur.close()
connection.close()

# 프로젝트 Import/Export 기능에서 현재 프로젝트의 모든 버전 정보를 조회하는 함수
# 학번을 매개 변수로 받는다
def fetch_csv_history_by_univid(univ_id):
connection = db_connect()
cur = connection.cursor(pymysql.cursors.DictCursor)

try:
cur.execute("SELECT * FROM history WHERE s_no = %s ORDER BY ver DESC", (univ_id,))
result = cur.fetchall()
return result
except Exception as e:
print(f"Error [fetch_csv_history_by_univid] : {e}")
return e
finally:
cur.close()
connection.close()