|
-
Dec 4th, 2003, 01:21 PM
#1
Thread Starter
Addicted Member
search query
Hi!
Could anyone please help with a search query!
I am creating a query which searches the records from one particular date to other with respect to a category.
And also i have other fields which needs to searched by category.
I have created a statement but it is not searchin w.r.t to category
Suppose if a user a enters a keyword the query searches in 2 fields but w.r.t the CATEGORY
but my query displays all the records w.r.t the Keyword.
"SELECT * FROM t_main " _
& " where f_title LIKE '%" & Replace(vartext, "'", "''") & "%' " _
& "OR f_title LIKE '%" & Replace(vartext, "'", "''") & "%' " _
& "OR f_desc LIKE '%" & Replace(vartext, "'", "''") & "%' " _
& "AND f_catid="& varc &" "_
& "AND f_cdate>='"& varafd &"' " _
& "AND f_cdate<='"& varatd &"' " _
& "ORDER BY f_cdate;"
I am stuck where i am getting wrong!
Please help!
Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|