/** * Saves staff model to the database and returns result (true/false) * * @param staffMember * @return result of saving */ public bool addStaffMember(StaffModel staffMember) { string query = "INSERT INTO " + table + "(`firstName`, `lastName`, `phoneNumber`, `staffType`) VALUES( " + this.getStringInMySqlInsertableFormat(staffMember.getFirstName()) + ", " + this.getStringInMySqlInsertableFormat(staffMember.getLastName()) + ", " + (staffMember.getPhoneNumber() == "NULL" ? staffMember.getPhoneNumber() : this.getStringInMySqlInsertableFormat(staffMember.getPhoneNumber())) + ", " + this.getStringInMySqlInsertableFormat(staffMember.getStaffType()) + " )"; return(this.db.Execute(query)); }