Les Mizzell wrote:
>
> SELECT * FROM news_pr
> Where Headline like '%#var1#%'
> or BodyText like '%#var2#%'
> or tagline like '%#var3#%'
> and pr_status='Active'
> and Year(pr_date) = #FORM.pubDATE#
> order by pr_date desc
>
>
> However, if I enter "1998" in the form, it's still returning results
> from other years...
>
> So, what's wrong with this?

What happens if var2 is empty?

Also, please use cfqueryparam.

Jochem
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to