Gossamer Forum
Home : Products : DBMan : Customization :

Following on from the IF-Then code...

Quote Reply
Following on from the IF-Then code...
I've got a match database at:
http://www.mancity.net/Test/fixtures.html

and I want the background colour of the row to change depending on whether the match is played at home or away.
Using the discussion relating to IF (Field)>0 etc...I've created this code:

if ($rec{'Venue'} = Away) {
print qq|<tr bgcolor="#E64C26">|;
}
if ($rec{'Venue'} = Home) {
print qq|<tr bgcolor="#C0C0C0">|;
}
else {
print qq|<tr bgcolor="#FFFFFF">|;
}
print qq|

BUT, it doesn't work. Is there something wrong with the "=" sign? Should I be using another character???

Ta.

Scall

Quote Reply
Re: Following on from the IF-Then code... In reply to
In Reply To:
Should I be using another character???
Yep.

Every place where you have a =, replace it with eq.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Following on from the IF-Then code... In reply to
A squillion thanks:
http://www.mancity.net/Test/fixtures.html

Ta.

Scall