last_row_id
This commit is contained in:
@@ -227,13 +227,22 @@ def start_register():
|
||||
lastname= data.get('lastname')
|
||||
email= data.get('email')
|
||||
|
||||
# mycursor = mydb.cursor()
|
||||
#
|
||||
# sql = "INSERT INTO customers (name, address) VALUES (%s, %s)"
|
||||
# val = ("John", "Highway 21")
|
||||
# mycursor.execute(sql, val)
|
||||
#
|
||||
# mydb.commit()
|
||||
|
||||
INSERT_MEMBERS = "INSERT INTO members_pending(email,firstname,lastname) VALUES('"+firstname+"','"+lastname+"','"+email+"')"
|
||||
with connection:
|
||||
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
|
||||
cursor.execute(INSERT_MEMBERS)
|
||||
|
||||
return jsonify(hello="ameye signup path world")
|
||||
last_row_id=cursor.cursor
|
||||
|
||||
return jsonify(hello="ameye signup path world", last_row_id=last_row_id)
|
||||
|
||||
except Exception as e:
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user