Commit f1d30fb2 authored by Richard's avatar Richard
Browse files

script update

parent d7035a4e
......@@ -5,6 +5,7 @@
# 1. mysql-connector pip module installed
# 2. local path to loading data files updated in script1
# 3. input your database name for the db_name variable
# 4. update connection info inside the python scripts
db_name="ece356"
mysql -u root --verbose --verbose $db_name < "scripts/script1.sql"
......@@ -13,7 +14,7 @@ mysql -u root --verbose --verbose $db_name < "scripts/script3.sql"
#tested up to there ^
python3 scripts/update_course_offering_date.py
python3 update_imd_band.py
python3 scripts/update_imd_band.py
mysql -u root --verbose --verbose $db_name < "scripts/script4.sql"
......
......@@ -78,6 +78,6 @@ alter table assessments
drop column assessment_type_o;
drop table Courses;
-- alter table studentInfo
-- drop column imd_band_o;
\ No newline at end of file
import mysql.connector
cnx = mysql.connector.connect(host='localhost', user='snvercil', database='Education', password="32darklink")
# cnx = mysql.connector.connect(host='localhost', user='snvercil', database='Education', password="32darklink")
cnx = mysql.connector.connect(host='127.0.0.1', user='root', database='ece356')
cursor = cnx.cursor()
cursor.execute("USE EDUCATION;")
cursor.execute("USE ece356;")
cursor.execute("SELECT * FROM courseOfferings;")
......
import mysql.connector
cnx = mysql.connector.connect(host='localhost', user='snvercil', database='Education', password="32darklink")
# cnx = mysql.connector.connect(host='localhost', user='snvercil', database='Education', password="32darklink")
cnx = mysql.connector.connect(host='127.0.0.1', user='root', database='ece356')
cursor = cnx.cursor()
cursor.execute("USE EDUCATION;")
cursor.execute("USE ece356;")
cursor.execute("SELECT * FROM studentInfo;")
c = cursor.fetchall()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment