last_row_id

This commit is contained in:
CHIEFSOFT\ameye
2024-12-17 12:32:19 -05:00
parent 845b3e908a
commit 81356e1d56
+10 -1
View File
@@ -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 {