-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1acd5b
commit a6023c7
Showing
13 changed files
with
1,143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import mysql.connector as m | ||
|
||
con=m.connect(host="localhost",user="root",password="PleaseEnterYourPassword") | ||
|
||
cur=con.cursor() | ||
|
||
print(''' | ||
| | |\ | ----- \ / ----- ------ ----- ------ ------- \ / | ||
| | | \ | | \ / | | | | | | \ / | ||
| | | \ | | \ / ----- ---- | | | \ / | ||
| | | \| | \ / | | \ | | | / | ||
----- ----- \/ ----- | \ ----- ------ | / | ||
|\ /| /\ |\ | /\ ------ ------ |\ /| ------ |\ | -------- | ||
| \ / | / \ | \ | / \ | | | \ / | | | \ | | | ||
| \/ | /----\ | \ | /----\ | |--| ---- | \/ | ---- | \ | | | ||
| | / \ | \ | / \ | | | | | | | | \ | | | ||
| | / \ | \| / \ |--| | ---- | | ----- | \| | | ||
-------- \ / -------- ------- --------- |\ /| | ||
| \ / | | | | \ / | | ||
|______ \ / |______ | |_______ | \/ | | ||
| \/ | | | | | | ||
| / | | | | | | ||
-------- / -------- | -------- | | | ||
''') | ||
|
||
cur.execute("show databases") | ||
for i in cur: | ||
print(i) | ||
|
||
|
||
print("="*78) | ||
print("1)Search for a collages in University Database ") | ||
print("2)For Update in a collage Database ") | ||
print("3)Insert New collage in University Database") | ||
print("4)Delete collage from University Database") | ||
print("5)Show list of Collages") | ||
print("6)Search for student in collage Database ") | ||
print("7)Insert New Student in collage Database") | ||
print("8)Delete New student from collage Database") | ||
print("9)Show list of Students") | ||
print("10)To Exit type 'EXIT' or 'exit'") | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import mysql.connector as m | ||
|
||
con=m.connect(host="localhost",user="root",password="PleaseEnterYourPassword",database="university") | ||
|
||
cur=con.cursor() | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
def search_into_collage1(): | ||
s=input("\nEnter collage Name of whom you want to see record\t") | ||
q="select*from collage where cname=%s" | ||
t=(s,) | ||
cur.execute(q,t) | ||
for i in cur: | ||
print("\nCode--->",i[0]) | ||
print("Collage Name--->",i[1]) | ||
print("City--->",i[2]) | ||
print("Courses--->",i[3]) | ||
print("="*60) | ||
con.commit() | ||
|
||
|
||
def search_into_collage2(): | ||
s=int(input("\nEnter collage code of whom you want to see record\t")) | ||
q="select*from collage where code=%s" | ||
t=(s,) | ||
cur.execute(q,t) | ||
for i in cur: | ||
print("\nCode--->",i[0]) | ||
print("Collage Name--->",i[1]) | ||
print("City--->",i[2]) | ||
print("Courses--->",i[3]) | ||
print("="*60) | ||
con.commit() | ||
|
||
|
||
def search_into_uit1(): | ||
s=input("\nEnter course Name of whom you want to see record\t") | ||
q="select*from uit where course=%s" | ||
t=(s,) | ||
cur.execute(q,t) | ||
for i in cur: | ||
print("\nSerial Number--->",i[0]) | ||
print("Branch Name--->",i[1]) | ||
print("Total Seats--->",i[2]) | ||
print("="*60) | ||
con.commit() | ||
|
||
|
||
def search_into_uit_student1(): | ||
s=input("\nEnter Students's Enrollment number of whom you want to see record\t") | ||
q="select*from uit_student where enroll=%s" | ||
t=(s,) | ||
cur.execute(q,t) | ||
for i in cur: | ||
print("\nEnrollment Number--->",i[0]) | ||
print("Student Name--->",i[1]) | ||
print("Branch--->",i[2]) | ||
print("Gender--->",i[3]) | ||
print("Blood Group--->",i[4]) | ||
print("Mobile Number--->",i[5]) | ||
print("="*60) | ||
con.commit() | ||
|
||
def search_into_uit_student2(): | ||
s=input("\nEnter Students's name of whom you want to see record\t") | ||
q="select*from uit_student where name=%s" | ||
t=(s,) | ||
cur.execute(q,t) | ||
for i in cur: | ||
print("\nEnrollment Number--->",i[0]) | ||
print("Student Name--->",i[1]) | ||
print("Branch--->",i[2]) | ||
print("Gender--->",i[3]) | ||
print("Blood Group--->",i[4]) | ||
print("Mobile Number--->",i[5]) | ||
print("="*60) | ||
con.commit() | ||
|
||
|
||
def search_into_uit_student3(): | ||
s=input("\nEnter Students's mobile number of whom you want to see record\t") | ||
q="select*from uit_student where mobile=%s" | ||
t=(s,) | ||
cur.execute(q,t) | ||
for i in cur: | ||
print("\nEnrollment Number--->",i[0]) | ||
print("Student Name--->",i[1]) | ||
print("Branch--->",i[2]) | ||
print("Gender--->",i[3]) | ||
print("Blood Group--->",i[4]) | ||
print("Mobile Number--->",i[5]) | ||
print("="*60) | ||
con.commit() | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import mysql.connector as m | ||
|
||
con=m.connect(host="localhost",user="root",password="PleaseEnterYourPassword",database="university") | ||
|
||
cur=con.cursor() | ||
|
||
q="create table collage(code int primary key,cname varchar(20),city varchar(15),courses int)" | ||
|
||
cur.execute(q) | ||
|
||
print("table created") | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Empty file.
Binary file not shown.
Oops, something went wrong.