Closed Thread Icon

Preserved Topic: contains (Page 1 of 1) Pages that link to <a href="" title="Pages that link to Preserved Topic: contains (Page 1 of 1)" rel="nofollow" >Preserved Topic: contains <span class="small">(Page 1 of 1)</span>\

Bipolar (III) Inmate

From: KY
Insane since: Nov 2001

posted posted 06-18-2002 15:12

Is it possible to do a query to a database for data "containing" something the user types in. Kind of like searching for help topics?

Any help is appreciated


Bipolar (III) Inmate

Insane since: May 2002

posted posted 06-18-2002 15:33

strSQL = "select * from table where fieldName like '%" & strSearchTerm & "%'"

should do the trick for you (where strSearchTerm is the previously entered search text)
a word of warning though - this sort of query takes longer to run than a simple "select * where field=x" type query, but if run it over a fairly small database, there shouldnt be too many problems


« BackwardsOnwards »

Show Forum Drop Down Menu