Where Woes

2010-12-20 Thread Rob Voyle
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

Re: Where Woes

2010-12-20 Thread Greg Morphis
Wrap it in quotes and use cfqueryparam sent from my Droid phone On Dec 20, 2010 10: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

Re: Where Woes

2010-12-20 Thread Jerry Johnson
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

Re: Where Woes

2010-12-20 Thread Rob Voyle
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

Re: Where Woes

2010-12-20 Thread Sean Corfield
On Mon, Dec 20, 2010 at 8:59 PM, Rob Voyle robvo...@voyle.com wrote: Yes Why? the quotes I have other query's where it works fine without quotes. If you have a numeric column then #var# will work. If you have a varchar column, you need '#var#' because the SQL syntax requires a 'string'. But