Forums

This topic is locked

Using LIKE in query

Posted 15 Jan 2007 16:55:54
1
has voted
15 Jan 2007 16:55:54 Steve Bedder posted:
Hi,

I'm using this query in my website...

SELECT * From Courses Where keywords LIKE '%" & Request.Form("keytext" & "%' AND removed = '0'

The form is a text field that posts to the same page.

When I navigate to the page, there are already results on the page because the query is seeing the LIKE '%" & Request.Form("keytext" & "%' as LIKE '% %'.

Does anyone have any advice how I can overcome this?

I dont want any results on the page when the user navigates to it, the results should only appear once they have submited the form on the same page.

Hope that makes sense.

Cheers

Steve

www.stockportcounty.net
XHTML | ASP | SQL 2005 | Access

Reply to this topic