You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it a security concern if I use the following approach to get data from my database?
def execute_query(self, query: str) -> list:
"""
Execute a query on the database and return the result.
Args:
query (str): The query to execute.
Returns:
list: The result of the query.
"""
cursor = self.mysql.connection.cursor()
cursor.execute(query)
result = cursor.fetchall()
cursor.close()
return result
If it's not safe can anyone suggest a better way to interact with my MySQL server with flask?
The text was updated successfully, but these errors were encountered:
Is it a security concern if I use the following approach to get data from my database?
If it's not safe can anyone suggest a better way to interact with my MySQL server with flask?
The text was updated successfully, but these errors were encountered: