title: How to view the executed query by tablegateway in zf2
body: <p>This is my controller action</p>
  
  <pre><code> public function updateAction()
  {
       // Retrieve parameters
      $event = $this-&gt;params()-&gt;fromRoute('event', null);
      $subUnitId = $this-&gt;params()-&gt;fromRoute('subunit', null);
      $employeeId = $this-&gt;params()-&gt;fromRoute('employee', null);
      $status = $this-&gt;params()-&gt;fromRoute('status', 0);
  
      // Construct data array for database update
      $data = array(
          'os_event_id' =&gt; $event,
          'sub_unit_id' =&gt; $subUnitId,
          'employee_id' =&gt; $employeeId,
          'created_by'  =&gt; $this-&gt;getCurrentUser(),
          'status'      =&gt; $status,
      );
  
      // Update status to database
  
  
      $this-&gt;getOsfTable()-&gt;updateStatus($data);
  
  
  
  
      $url = $this-&gt;getRequest()-&gt;getHeader('Referer')-&gt;getUri();
      return $this-&gt;redirect()-&gt;toUrl($url);
  }
  </code></pre>
  
  <p>and this is my model </p>
  
  <pre><code>public function updateStatus($data)
  {
  
          $this-&gt;tableGateway-&gt;update(array(
              'status'     =&gt; $data['status'],
              'created_by' =&gt; $data['created_by'],
          ), array(
              'os_event_id' =&gt; $data['os_event_id'],
              'employee_id' =&gt; $data['employee_id'],
              'sub_unit_id' =&gt; $data['sub_unit_id'],
          ));
  
  }
  </code></pre>
  
  <p>everytime i trigger the update function, it runs through the whole code but the update doesn't functioning. i check the passed data and parameters and it is correct so now i want to check the created query of my mode. Thanks in Advance.</p>