Hi Jerry and Greg

Thanks.
Yes Why? the quotes
I have other query's where it works fine without quotes.
Rob



On 20 Dec 2010 at 23:51, Jerry Johnson wrote:

> 
> you need to surround the program variable with single quotes, like
> so....
> 
> where programCode1='#program#'
> 
> Please ask if you need an explanation of why.
> 
> Jerry Milo Johnson
> 
> On Mon, Dec 20, 2010 at 11:48 PM, Rob Voyle <robvo...@voyle.com>
> wrote:
> 
> >
> > Hi Folks
> >
> > I have a mysql table that I am querying with CF
> >
> > One of the columns is programCode1
> >
> > I have a where statement:
> >
> > where programCode1=#program#
> >
> > that returns the error message:
> > Unknown column 'atmBaltimore41' in 'where clause'
> >
> > atmBaltimore41 is the value of #program#
> >
> > If I put the atmBaltimore41 as a string
> >
> > where programCode1="atmBaltimore41"
> >
> > it works fine, but I need to use the variable
> >
> > Any ideas?
> >
> > thanks
> >
> > Rob
> > Robert J. Voyle, Psy.D.
> > Director, Clergy Leadership Institute
> > For Coaching and Training in Appreciative Inquiry
> > Author: Restoring Hope: Appreciative Strategies
> >             to Resolve Grief and Resentment
> > http://www.appreciativeway.com/
> > 503-647-2378 or 503-647-2382
> >
> >
> > 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~|
> Order the Adobe Coldfusion Anthology now!
> http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=
> houseoffusion
> Archive:
> http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:34
> 0182
> Subscription:
> http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
> Unsubscribe:
> http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340183
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to