Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehuldobriyal123 authored Feb 27, 2023
1 parent e1acd5b commit a6023c7
Show file tree
Hide file tree
Showing 13 changed files with 1,143 additions and 0 deletions.
62 changes: 62 additions & 0 deletions admin.py
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'")










110 changes: 110 additions & 0 deletions collage.py
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()












48 changes: 48 additions & 0 deletions collage_t_created.py
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 added courses.py
Empty file.
Binary file added defn.cpython-310.pyc
Binary file not shown.
Loading

0 comments on commit a6023c7

Please sign in to comment.