Database Select statment not tatking input from html input field
-2
votes
1
answer
54
views
Traceback (most recent call last):
> File "/home/will/.local/lib/python3.6/site-packages/flask/app.py", line 2073, in wsgi_app\
response = self.full_dispatch_request()\
File "/home/will/.local/lib/python3.6/site-packages/flask/app.py", line 1518, in full_dispatch_request\
rv = self.handle_user_exception(e)\
File "/home/will/.local/lib/python3.6/site-packages/flask/app.py", line 1516, in full_dispatch_request\
rv = self.dispatch_request()\
File "/home/will/.local/lib/python3.6/site-packages/flask/app.py", line 1502, in dispatch_request\
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)\
File "main.py", line 30, in do_admin_login
conn.execute(query)\
pyodbc.ProgrammingError: ('42S22', "[42S22] [ma-3.1.12][10.3.28-MariaDB]Unknown column 'tvandiver' in 'where clause' (1054) (SQLExecDirectW)")
Error I get when executing login prompt. tvandiver is what is entered into html page.
If I run a statement in sql console I get a back response of 1. When I run it with HTML page through python3 it sends back an error. I have tried wrapping input from the page in str() but still wont take the inputted text. Also if I run it just in python3 same SELECT statement it returns True, but not from html input field.
Asked by tvandiver
(1 rep)
May 9, 2023, 10:53 PM
Last activity: May 14, 2023, 09:33 PM
Last activity: May 14, 2023, 09:33 PM