gadjodilo77
Programmer
Hello,
I have a question.Imagine I have the following FORMvalue or Formvariable: BER-06-3005,BER-06-3008,BER-06-3008
What I want to do is to make a query using this formvalue. Each BER-06-xxxx number is a namenumber in an database table. What I want to do is make a Query and select the data for each BER-06-xxxx value (BER-06-xxxx separated by a comma in the formvalue/formvariable). I tried several things but I don't know how to do it.
I tried it like this:
<cfquery name="name" datasource="source">
SELECT * FROM dev WHERE dev_volgnr IN (#FORMvalue#)
</cfquery>
This gives the following error however:
Error Executing Database Query.
Column not found: Unknown column 'BER' in 'where clause'
So because of the error I tried it by putting ' at the front and the end of the FORMvalue variable, like this:
<cfquery name="name" datasource="source">
SELECT * FROM dev WHERE dev_volgnr IN ('#FORMvalue#')
</cfquery>
I have a question.Imagine I have the following FORMvalue or Formvariable: BER-06-3005,BER-06-3008,BER-06-3008
What I want to do is to make a query using this formvalue. Each BER-06-xxxx number is a namenumber in an database table. What I want to do is make a Query and select the data for each BER-06-xxxx value (BER-06-xxxx separated by a comma in the formvalue/formvariable). I tried several things but I don't know how to do it.
I tried it like this:
<cfquery name="name" datasource="source">
SELECT * FROM dev WHERE dev_volgnr IN (#FORMvalue#)
</cfquery>
This gives the following error however:
Error Executing Database Query.
Column not found: Unknown column 'BER' in 'where clause'
So because of the error I tried it by putting ' at the front and the end of the FORMvalue variable, like this:
<cfquery name="name" datasource="source">
SELECT * FROM dev WHERE dev_volgnr IN ('#FORMvalue#')
</cfquery>