The x are to not display the actual data im putting into the database, this is just to allow me to validate many other things on the app.
Code: Select all
on mouseup
put "123" into tImageCheck
put "xxx" into tUserNameCheck
put "xxx!!" into tPasswordCheck
put "xxxx.mil" into tDoDEmailCheck
put "xx" into tDSNCheck
put "xxx" into tPersonellNumberCheck
put "What was your favorite sport in high school?" into tSecurityQuestion1
put "xxx" into tSecurityAnswer1
put "What is your favorite movie?" into tSecurityQuestion2
put "xxxx" into tSecurityAnswer2
put "What was the name of the company where you had your first job?" into tSecurityQuestion3
put "xxx" into tSecurityAnswer3
put "xxx" into tBranchCheck
put "xxx" into tBaseCheck
put "xxxx" into tOperationsGroupCheck
put "xxxx" into tSquadronCheck
put "xxxxx" into tFlightCheck
put "xxx" into tRankCheck
put "tImageCheck, tUserNameCheck, tPasswordCheck, tDoDEmailCheck, tDSNCheck, tPersonellNumberCheck, tAddressCheck, tSecurityQuestion1, tSecurityAnswer1, tSecurityQuestion2, tSecurityAnswer2, tSecurityQuestion3, tSecurityAnswer3, tBranchCheck, tBaseCheck, tOperationsGroupCheck, tSquadronCheck, tFlightCheck, tRankCheck" into tALLFIELDS
put "xxxx" into tBA
put "xxxx" into tDBN
put "xxxx" into tDBU
put "xxx" into tDBP
put revOpenDatabase("mysql", tBA, tDBN, tDBU, tDBP) into lLogin
put lLogin into gConnectionID
if lLogin is a number then
put "INSERT INTO PAV2_ACCOUNTS (" & tALLFIELDS & ") VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23)" into lSQL
---------------------------
--THE BELLOW LINE COULD FUCK UP
---------------------------
revExecuteSQL gConnectionID, lSQL, "tImageCheck", "tUserNameCheck", "tPasswordCheck", "tDoDEmailCheck", "tDSNCheck", "tPersonellNumberCheck", "tAddressCheck", "tSecurityQuestion1", "tSecurityAnswer1", "tSecurityQuestion2", "tSecurityAnswer2", "tSecurityQuestion3", "tSecurityAnswer3", "tBranchCheck", "tBaseCheck", "tOperationsGroupCheck", "tSquadronCheck", "tFlightCheck", "tRankCheck"
if item 1 of tData = "revdberr" then
answer error "There was a problem querying the database:" & cr & tData
else
answer "Data Added"
revCloseDatabase gConnectionID
end if
end if
end mouseup