<br><font size=2 face="sans-serif">I apologize that this is not really
db related. &nbsp;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 &lt;maciej.wisniowski@coig.katowice.pl&gt;</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 &nbsp; &nbsp; &nbsp; &nbsp;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>
&gt; If item/results is == 0 I want to display &quot;Pass&quot; in green.<br>
&gt; If item/results is == 1 I want to display &quot;Fail&quot; in red.
&nbsp;<br>
<br>
But you already have such clauses in your code. Try:<br>
<br>
&lt;span tal:condition=&quot;python: item['results']==0&quot; class=&quot;green&quot;&gt;Pass&lt;/span&gt;<br>
&lt;span tal:condition=&quot;python: item['results']==1&quot; class=&quot;red&quot;&gt;Fail&lt;/span&gt;<br>
<br>
or if you have only two values (0 and 1):<br>
<br>
&lt;span tal:attributes=&quot;class python: item['results']==0 and 'green'
or 'red'&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tal:content=&quot;python: item['results']==0
and 'Pass' or <br>
'Fail'&quot;&gt;Fail or Pass&lt;/span&gt;<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>