Gossamer Forum
Home : Products : DBMan : Discussions :

printing if text exist

Quote Reply
printing if text exist
I'm trying to change dbman to print a text if a field contains a certain string.

I thought this string should do it:

if ($rec{'Description'} eq /Sugar/) {print qq|
<b>Warning:<b> sugar may be sweet!
|;
}

But doesn't print anything even if Sugar is in the field (among other ingredients, the field content may look like:

Flour``Sugar``Cream``Strawberry jam``etc).

What am I doing wrong?

(btw the warning text is essential: it will warn for ingredients dangerous if handled incorrectly. the sugar line above is only a place holder)

TIA

C.

Subject Author Views Date
Thread printing if text exist Chimbis 2849 Sep 11, 2000, 10:16 PM
Thread Re: printing if text exist
AstroBoy 2745 Sep 11, 2000, 10:44 PM
Post Re: printing if text exist
Chimbis 2760 Sep 12, 2000, 1:16 AM