title: Zend Framework: MySQL insertion error of timestamp
body: <p>I have multiple insertion into the db from a form. Code is given below:</p>
  
  <pre><code>if(isset($_POST['Submit']))
  {
                 $UserID=$_POST['UserID'];
                 $StartTime=$_POST['StartTime'];
                 $StartDate=$_POST['StartDate'];
                 $EndTime=$_POST['EndTime'];
                 $EndDate=$_POST['EndDate'];
                 $TimeWorked=$_POST['TimeWorked'];
                 $i=0;
                 foreach( $UserID as $key =&gt; $n ) 
                 {
                     $UID=$UserID[$key];
                     $TW=$TimeWorked[$key];
                     $Stime =strtotime("{$StartTime[$key]} {$StartDate[$key]}");
                     $Etime = strtotime("{$EndTime[$key]} {$EndDate[$key]}");
                     echo $i."-".$n."::user Id".$UID.."//Stime:".$Stime."//Etime:".$Etime."&lt;br/&gt;";
  
                     $tasks = new Timesheets_Table_Tasks();
  
                     $tasks-&gt;createRow()
                     -&gt;setFromArray(array
                         (
                             'Date'=&gt;time(),
                             'UserID'=&gt;$UID,
                             'Time'=&gt;$TW,
                             'StartTime'=&gt;$Stime,
                             'EndTime'=&gt;$Etime
  
                         ))
                         -&gt;save();
                     $i++;
  
                 }
  }
  </code></pre>
  
  <p>Everything is inserted into the database except StartTime &amp; EndTime. I can display the values using this line </p>
  
  <pre><code>'echo $i."-".$n."::user Id".$UID.."//Stime:".$Stime."//Etime:".$Etime."&lt;br/&gt;";'
  </code></pre>
  
  <p>(just before the insertion). But nothing is inserted in the database.</p>
  
  <p>The example value of StartTime &amp; EndTime is 1427693580(timestamp).</p>
  
  <p><strong>Mysql Structure:</strong></p>
  
  <ul>
  <li>Type: int(11) </li>
  <li>Null:Yes</li>
  <li>Default: NULL.</li>
  </ul>
  
  <p>I am not sure what is happening with the insertion of those two fields. I am getting 'NULL' in the database after insertion. Please help me to find out.</p>
  
  <p>Thanks! </p>