define vars before SQL statement
This commit is contained in:
parent
0ad23e9be4
commit
ec7ff3e3e1
@ -33,10 +33,11 @@ def convenorAddClub():
|
||||
|
||||
@routes.route('/convenor/clubAddResult', methods=['POST'])
|
||||
def convenorAddClubResult():
|
||||
club_lookup = "SELECT club FROM _clubTeams WHERE club='" + _club + "' GROUP BY club"
|
||||
club_create = "INSERT INTO _clubTeams (club, team) VALUES ('" + _club + "', 'A')"
|
||||
try:
|
||||
_club = request.form['clubName']
|
||||
club_lookup = "SELECT club FROM _clubTeams WHERE club='" + _club + "' GROUP BY club"
|
||||
club_create = "INSERT INTO _clubTeams (club, team) VALUES ('" + _club + "', 'A')"
|
||||
|
||||
# validate that this data has been entered
|
||||
if _club and request.method == 'POST':
|
||||
clubExist = sql_read(club_lookup)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user