Click to See Complete Forum and Search --> : Recognizing part of a string


NatuScape
12-10-2002, 08:53 AM
Hi all!

A newbie here with a simple question... If I use:

<%
if FP_FieldHTML(fp_rs,"SkinHazards") = "Skin contact" then
Response.Write("checked")
else
Response.Write("unchecked")
end if
%>

Then I only get results if the field contains ONLY "Skin contact", I need it to go "checked" whenever there is "Skin contact" somewhere in the field. I tried using the LIKE operator that works with SQL or using *, but those were bad ideas!!

Help! Pretty please? Thanks!!

Natalia

NatuScape
12-10-2002, 09:55 AM
In case anyone cared... the solution was to use

if InStr(FP_FieldHTML(fp_rs,"SkinHazards"),"Chemical burn") > 0


I got the reply in another forum. Thanks anyway!!

Natalia