title: Zend_Db_Expr not working
body: <p>I am trying to use <code>Zend_Db_Expr</code> in my installation ZF1 on my Mac.  This works in production, but doesn't work on my Mac.  Our production server is running MySQL 5.1 and my Mac is running 5.6.  Has something changed with MySQL that it doesn't allow <code>Zend_Db_Expr</code> to work with later versions of MySQL?</p>
  
  <p>I've tried using both <code>new Zend_DB_Expr('NULL')</code> and both <code>new Zend_Db_Expr('NOW')</code> and <code>new Zend_Db_Expr('NOW()')</code> and neither works.  (I believe the latter is correct.  Does anyone have any insight as to why this is happening.</p>
  
  <p>I don't know whether it's because I'm on a Mac or it's just changes in MySQL.  I'd appreciate any help.  The error I get is <code>Incorrect datetime value: 'NOW()' for column 'date_closed'</code> But also <code>Incorrect datetime value: 'NOW' for column 'date_closed'</code></p>
  
  <pre><code>$arrData['internal_review_date']        = $this-&gt;getRequest()-&gt;getPost('internal_review_date','0000-00-00 00:00:00');
              if ($arrData['internal_review_date'] != '0000-00-00 00:00:00') {
                  $arrData['internal_review_date'] = date('Y-m-d', strtotime($arrData['internal_review_date']));
              }
              $arrData['desired_launch_date']        = $this-&gt;getRequest()-&gt;getPost('desired_launch_date','0000-00-00 00:00:00');
              if ($arrData['desired_launch_date'] != '0000-00-00 00:00:00') {
                  $arrData['desired_launch_date'] = date('Y-m-d', strtotime($arrData['desired_launch_date']));
              }
              $arrData['submitted_by']         = trim($this-&gt;getRequest()-&gt;getPost('submitted_by'));
              $arrData['approved_by']          = trim($this-&gt;getRequest()-&gt;getPost('approved_by'));
              $arrData['approval_date']        = $this-&gt;getRequest()-&gt;getPost('approval_date','0000-00-00 00:00:00');
              if ($arrData['approval_date'] != '0000-00-00 00:00:00') {
                  $arrData['approval_date'] = date('Y-m-d', strtotime($arrData['approval_date']));
              }
              $arrData['myriad_notes']        = $this-&gt;getRequest()-&gt;getPost('myriad_notes');
              $arrData['approved_by']          = trim($this-&gt;getRequest()-&gt;getPost('approved_by'));
              $arrData['request']              = trim($this-&gt;getRequest()-&gt;getPost('request'));
              $arrData['objective']            = trim($this-&gt;getRequest()-&gt;getPost('objective'));
              $arrData['additional_info']      = trim($this-&gt;getRequest()-&gt;getPost('additional_info'));
              $arrData['study_club']           = (int) $this-&gt;getRequest()-&gt;getPost('study_club');
              $arrData['digital_campus']       = (int) $this-&gt;getRequest()-&gt;getPost('digital_campus');
              $arrData['case_assistant']       = (int) $this-&gt;getRequest()-&gt;getPost('case_assistant');
              $arrData['faculty_club']         = (int) $this-&gt;getRequest()-&gt;getPost('faculty_club');
              $arrData['spear_review']         = (int) $this-&gt;getRequest()-&gt;getPost('spear_review');
              $arrData['spear_talk']           = (int) $this-&gt;getRequest()-&gt;getPost('spear_talk');
              $arrData['admin']                = (int) $this-&gt;getRequest()-&gt;getPost('admin');
              $arrData['other']                = (int) $this-&gt;getRequest()-&gt;getPost('other');
              $arrData['request_status']       = $this-&gt;getRequest()-&gt;getPost('request_status', 'Active');
              if ($arrData['request_status'] == 'Completed') {
                  $arrData['date_closed'] = new Zend_Db_Expr('NOW');
              } else {
                  $arrData['date_closed'] = '0000-00-00 00:00:00';
              }
  
  
  ....
   $objWebsite = new Website_Requests();
  if ($intId == 0) {
                      $arrData['date_created'] = new Zend_Db_Expr('NOW()');
                      $intId = $objWebsite-&gt;insert($arrData);
                      $this-&gt;_helper-&gt;FlashMessenger(array('success' =&gt; 'The Website Request Form has been submitted successfully.'));
                  } else {
                      $arrData['date_updated'] = new Zend_Db_Expr('NOW()');
                      $strWhere = $objWebsite-&gt;getAdapter()-&gt;quoteInto('id = ?', $intId);
                      $objWebsite-&gt;update($arrData, $strWhere);
                      $this-&gt;_helper-&gt;FlashMessenger(array('success' =&gt; 'The Website Request Form has been updated successfully.'));
                  }
  </code></pre>