def submitHiringCandidate(Firstname, Lastname, EmailID, India_Number,
                          US_Number, Visa_Status, College_Name1, College_Name2,
                          India_Address, US_Address, reference):
    sql = "INSERT INTO CANDIDATES (candidate_id, Firstname, Lastname, EmailID, Contact_Number, Visa_Status, College_Name1, College_Name2, reference, state) VALUES ('" + get_candidate_id(
    ) + "','" + Firstname + "','" + Lastname + "','" + EmailID + "','" + India_Number + "','" + US_Number + "','" + Visa_Status + "','" + College_Name1 + "','" + College_Name2 + "','" + India_Address + "','" + US_Address + "','" + reference + "','0');"
    try:
        mycursor.execute(sql)
    except mysql.connector.Error as err:
        print('error')
    finally:
        mydb.commit()
示例#2
0
def saveHiringCandidate(cid,Firstname,Lastname,EmailID,India_Number,US_Number,Visa_Status,College_Name1,College_Name2,India_Address,US_Address,reference):
    mycursor.execute("UPDATE CANDIDATES SET Firstname='"+ Firstname +"', Lastname='"+ Lastname +"', EmailID='"+ EmailID +"', India_Number='"+ India_Number +"', US_Number='"+ US_Number +"', Visa_Status='"+ Visa_Status +"', College_Name1='"+ College_Name1 +"', College_Name2='"+ College_Name2 +"', India_Address='"+ India_Address +"', US_Address='"+ US_Address +"', reference='"+ reference +"' WHERE candidate_id='" +cid +"';")
    mydb.commit()