So I'm about to create a simple site where users can input their own SQL queries, which I will be running on the server side.
I'm aware of SQL injection attacks and assume this could be fairly risky thing to do.
But (if there is any) what would be a safe way to allow this feature?
e.g. I can think of the following rules I can enforce.
- Allow users to only "SELECT" - never allow UPDATE, DELETE (or anything else).
- Allow users to only access certain tables (if I know them).
Are there any other security measures I should take?