[Zope] Compare String to Integer

Bobby cybercruiserz at yahoo.com
Tue Apr 21 13:04:48 EDT 2009


Hi,

I can't compare a string (pid) to an integer (brand_id); what's is wrong with my code below? pid is being passed in the URL as &pid= , brand_id is an integer from a database table. Could someone help me with this so that I could make the if statement comparison work? Thanks.  

<dtml-in "getTable()">
  <OPTION VALUE="<dtml-var brand_id>" 
    <dtml-if expr="brand_id==pid">SELECTED
     </dtml-if> /> <dtml-var brand_name>
</dtml-in getTable>


      


More information about the Zope mailing list