Navneet Project
Navneet Project
Navneet Project
conn=sql.connect(host='localhost',user='root',passwd='jhajjar@123',database='navneet')
if conn.is_connected():
print('connected succesfully')
cur = conn.cursor()
2.
conn=sql.connect(host='localhost',user='root',passwd='jhajjar@123',database='navneet')
cur = conn.cursor()
3.
conn=sql.connect(host='localhost',user='root',passwd='jhajjar@123',database='navneet')
cur = conn.cursor()
cur.execute('create table user_table(username varchar(25) primary key,passwrd varchar(25) not null
)')
4.
import datetime as dt
conn=sql.connect(host='localhost',user='root',passwd='jhajjar@123',database='navneet')
cur = conn.cursor()
conn.autocommit = True
c = 'y'
while c == 'y':
print()
print()
print('2.TRANSACTION')
print()
print('3.CUSTOMER DETAILS')
print()
print('4.TRANSACTION DETAILS')
print()
print('5.DELETE ACCOUNT')
print()
print('6.QUIT')
print()
print()
if n == 1:
print()
print()
print()
print()
cur.execute(V_SQLInsert)
print()
conn.commit()
if n == 2:
data=cur.fetchall()
count=cur.rowcount
conn.commit()
if count == 0:
print()
print()
else:
print()
print('1.WITHDRAW AMOUNT')
print()
print('2.ADD AMOUNT')
print()
print()
print()
if x == 1:
cr_amt=0
conn.commit()
print()
if x== 2:
cr_amt=0
cur.execute( V_SQLInsert)
conn.commit()
print()
if n == 3:
print()
if cur.fetchone() is None:
print()
else:
data=cur.fetchall()
print('ACCOUNT NO=',acct_no)
print()
print('ACCOUNT NAME=',row[1])
print()
print()
print('ADDRESS=',row[3])
print()
print('cr_amt=',row[4])
if n == 4:
print()
if cur.fetchone() is None:
print()
else:
data=cur.fetchall()
print('ACCOUNT NO=',acct_no)
print()
print('DATE=',row[1])
print()
print()
print('AMOUNT ADDED=',row[3])
print()
if n == 5:
if n == 6:
else:
quit()
5.
conn=sql.connect(host='localhost',user='root',passwd='jhajjar@123',database='navneet')
cur = conn.cursor()
import datetime as dt
print(dt.datetime.now())
print('1.REGISTER')
print()
print('2.LOGIN')
print()
print()
if n== 1:
name=input('Enter a Username=')
print()
print()
V_SQLInsert="INSERT INTO user_table (passwrd,username) values (" + str (passwd) + ",' " + name
+ " ') "
cur.execute(V_SQLInsert)
conn.commit()
print()
import project4
if n==2 :
name=input('Enter your Username=')
print()
V_Sql_Sel="select * from user_table where passwrd='"+str (passwd)+"' and username= ' "
+name+ " ' "
cur.execute(V_Sql_Sel)
if cur.fetchone() is None:
print()
else:
print()
import project4