Hi, Thanks for any help in advance...
The Problem - I have a search routine below, which works and
will return any result where the seach words is found in my DB
products.prodName, all good...
However i'd like it to also like to look at my
products.productDesc (at the same time) to see if the
description also has the word - anyone know how i can achieve
this?
strSQL = "SELECT * FROM products WHERE "
strSQL = strSQL & BuildSQL ("products.prodName",
sarySearchWord)
Function BuildSQL (strTable, sarySearchWord)
intSQLLoopCounter = 0
BuildSQL = BuildSQL & "(" & strTable & " LIKE '%" &
sarySearchWord(0) & "%'"
For intSQLLoopCounter = 1 To UBound(sarySearchWord)
If Request.QueryString("searchMode") = "allwords" Then
BuildSQL = BuildSQL & " AND "
else
BuildSQL = BuildSQL & " OR "
End if
BuildSQL = BuildSQL & strTable & " LIKE '%" &
sarySearchWord(intSQLLoopCounter) & "%'"
Next
BuildSQL = BuildSQL & ")"
End Function
----------------------------------------------
Posted with NewsLeecher v2.0 Beta 5
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------