cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerry Kaplan" <>
Subject DateInputModule
Date Wed, 27 Oct 2004 13:30:04 GMT
I am trying to create a sitemap that, after validating a form, will add the
fields to a MySQL database. The database definitions are as follows:

   <table name="reports" alias="reports">
         <key name="ReportId" type="int" autoincrement="true">
            <mode name="auto"  type="autoincr"/>
         <value name="UserId"  type="string"></value>
            <mode name="session-attr" type="all">
         <value name="ReportRef" type="string"></value>
         <value name="PatName"  type="string"></value>
         <value name="CreationDate" type="time-stamp"></value>
         <value name="ModifiedDate" type="time-stamp"></value>
         <value name="ExamDate"  type="date"></value>
         <value name="ReportXML" type="blob"></value>
   <table-set name="add-report">
      <table name="reports"/>

2 questions:

1. How can I populate "CreationDate" and "ModifiedDate" with the current
datetime (timestamp). I cannot find a good example of how to use the
DateInputModule with a database.

2. In the above example, I have specified the "mode" tag on the UserId
value. Is it possible that this be placed in the table-set instead of the
table definition?

Thanks in advance!


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message