'Raw "Insert" SQL in SQLAlchemy, Flask
Values are not added to the database after INSERT query. SELECT is working fine this way
db = SQLAlchemy(app)
...
session['sql_raw_reports_post'] = "insert into database (x, y) values (xa, ya)"
r = db.session.execute(session['sql_raw_reports_post'])
...
return 'success'
Solution 1:[1]
you can try add
db.commit()
ater "insert" action
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | smwd |
