예제 #1
0
def add():
	email = request.form["email"]
	print fname

	#cmd = "insert into EMPLOYEE(FIRST_NAME, LAST_NAME, AGE, SEX, INCOME) VALUES (?,?,?,?,?)",(fname,lname,age,sex,income))
 	cmd = "insert into EMPLOYEE(emailId) VALUES ('%s')" %(email))
	conn, cursor = querydb.conn()
	status = querydb.insert(cmd,conn, cursor)
	return status
예제 #2
0
파일: views.py 프로젝트: divyanksingh/share
def add():
	fname = request.form["firstname"]
	print fname
	lname = request.form["lastname"]
	age = request.form["age"]
	sex = request.form["sex"]
	income = request.form["income"]
	#cmd = "insert into EMPLOYEE(FIRST_NAME, LAST_NAME, AGE, SEX, INCOME) VALUES (?,?,?,?,?)",(fname,lname,age,sex,income))
 	cmd = "insert into EMPLOYEE(FIRST_NAME, LAST_NAME, AGE, SEX, INCOME) VALUES ('%s','%s',%d,'%s',%d)" %(fname,lname,int(age),sex,long(income))
	conn, cursor = querydb.conn()
	status = querydb.insert(cmd,conn, cursor)
	return status