Question
SQL where clause problem
I'm trying to construct the query dynamically
SELECT *
FROM transmission
WHERE manufacturer="BMW"
* is stored in #client.SQLselect#
transmission is stored in #client.SQLfrom#
BMW is stored in #form.listManufacturer#
where manufacturer="BMW" is what should be stored in #client.SQLwhere# but I can't get this to work...
I've tried this, but it doesn't work
<cfset #client.SQLwhere="where manufacturer=""#form.listManufacturer#""">
Can someone explain how to combine the above on a line so it works ?
SELECT *
FROM transmission
WHERE manufacturer="BMW"
* is stored in #client.SQLselect#
transmission is stored in #client.SQLfrom#
BMW is stored in #form.listManufacturer#
where manufacturer="BMW" is what should be stored in #client.SQLwhere# but I can't get this to work...
I've tried this, but it doesn't work
<cfset #client.SQLwhere="where manufacturer=""#form.listManufacturer#""">
Can someone explain how to combine the above on a line so it works ?
