RE: DTML-IF problem
Well, Here's what I do when my database doesn't return anything... <dtml-in getProjects> <tr> <td><input type="radio" name="ID" value="<dtml-var id>"><dtml-var id></td> <td><dtml-var startdate></td> <td><dtml-var enddate></td> <td><dtml-var location></td> <td><dtml-var assignedto></td> <td><dtml-var name></td> <td><center><dtml-var percentcompleted>%</center></td> </tr> <dtml-else> <h1>No projects found.</h1><br><br><br> </dtml-in> -----Original Message----- From: K. Praveen Kumar [mailto:praveen@softprosys.com] Sent: Tue 10/7/2003 3:43 AM To: zope@zope.org; Praveen Kumar Cc: Derek S. Wilson; dieter@handshake.de; allison@sumeru.stanford.EDU; lukesh@seznam.cz; cms@adytumsolutions.com Subject: DTML-IF problem Dear All, I am getting problem while evaluating the condition. I am retrieving the values from MySQL database to show in the text boxes. Here I would like to test whether the data in the database is empty or not. If empty then I would like to show one message, if not I wanted to get the value. This is the code: ***************************************************************** <input type="text" name="date3:date" size="15" value="<dtml-if "Child_Enrollment_Date=='NULL'"><dtml-var Child_Enrollment_Date null=""><dtml-else><dtml-call "REQUEST.set('Child_Enrollment_Date1',Child_Enrollment_Date.strftime('%m/%d/%Y'))"><dtml-var Child_Enrollment_Date1 null=""></dtml-if>"> ***************************************************************** It is every time executing the <dtml-else> part. How can I validate the 'Null'? Please give your suggestions on this -- Thanks & Regards Praveen Kumar SoftPro Systems Ltd
participants (1)
-
Derek S. Wilson