I'm intending to code a solution where table and command are fixed but parameters can vary i.e. are entered by internet users. How risky is this?
So far only PHP code was used.
predefined: SELECT
user defined: select_expr [, select_expr ...]
predefined: [FROM table_references
WHERE + user defined: [where_condition]
GROUP BY + user defined: {col_name | expr | position}
[ASC | DESC], ... [WITH ROLLUP]]
[HAVING + user defined where_condition]
[ORDER BY + user defined {col_name | expr | position}
[ASC | DESC], ...]
[LIMIT + user defined {[offset,] row_count | row_count OFFSET offset}]
The proposal should work if the PHP code only uses mySQL commands where the right side is defined. WHERE is combined with the user input 'Temp > 10' as example