<br><font size=2 face="sans-serif">I apologize that this is not really
db related. Thanks it worked perfectly!!</font>
<br>
<br><font size=2 face="sans-serif">---<br>
<br>
Steven M. Klass<br>
<br>
Design Automation Manager<br>
<br>
SMSC<br>
3930 East Ray Road, Suite 200<br>
Phoenix, Arizona 85044<br>
(480) 704-7046 (Desk)<br>
(480) 225-1112 (Mobile)<br>
steven.klass@smsc.com</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Maciej Wisniowski <maciej.wisniowski@coig.katowice.pl></b>
</font>
<br><font size=1 face="sans-serif">Sent by: zope-db-bounces@zope.org</font>
<p><font size=1 face="sans-serif">07/21/06 02:50 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Steven Klass/SMSC@SMSC</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">zope-db@zope.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [Zope-DB] ZSql and evaluating the
results for a 0 or 1 - Newbie help</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Is this really DB related? ;)<br>
<br>
> If item/results is == 0 I want to display "Pass" in green.<br>
> If item/results is == 1 I want to display "Fail" in red.
<br>
<br>
But you already have such clauses in your code. Try:<br>
<br>
<span tal:condition="python: item['results']==0" class="green">Pass</span><br>
<span tal:condition="python: item['results']==1" class="red">Fail</span><br>
<br>
or if you have only two values (0 and 1):<br>
<br>
<span tal:attributes="class python: item['results']==0 and 'green'
or 'red'"<br>
tal:content="python: item['results']==0
and 'Pass' or <br>
'Fail'">Fail or Pass</span><br>
<br>
or... few other possibilities exists too.<br>
<br>
I'm not sure whether 'item' is a dictionary so above code may fail on it.<br>
<br>
-- <br>
Maciej Wisniowski<br>
_______________________________________________<br>
Zope-DB mailing list<br>
Zope-DB@zope.org<br>
http://mail.zope.org/mailman/listinfo/zope-db<br>
<br>
</tt></font>
<br>