Final answer:
The student requires guidance with creating a web application that serves as an online SQL editor/tester, capable of executing user-entered SQL queries and displaying results or confirmations accordingly.
Step-by-step explanation:
The student is asking for assistance in creating a Web app using Python, Flask, and MySQL that functions as an online SQL editor/tester. To achieve this, the student needs to design a web interface that allows users to enter SQL queries and display the results. The app must handle both SELECT and INSERT INTO queries properly. For SELECT queries, results should be shown in an HTML table with only the requested columns, while for INSERT INTO queries, a confirmation message should be displayed.
Requirements and Steps:
Handle SQL query input: Create an HTML form with a text box for query input and a submit button.
Process query in Python: Use Flask to capture the query and pass it as a string to the MySQL server.
Execute and display query results: Retrieve query results and pass them into an HTML page as a table for SELECT queries or as a confirmation message for INSERT INTO queries.
It is important to sanitize the input to prevent SQL injection attacks. The system should also include error handling for failed queries and communicate these to the user in an understandable manner.