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
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