I want to keep a history of sql commands that have been run from an application in ColdFusion, but I keep getting this error:
The name 'select * from sql_history' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
Here is my code
<cfquery name="history" datasource="#ds#">
INSERT INTO sql_history VALUES
("#form.sql#")
</cfquery>
My sql_history table is just an int 'id' and text 'sql'.
Is there a way to escape the query or something so that it just goes in as a string?