title: Update query using dynamic data in zend?
body: <p>I am using zend, I have the following code like </p>
  
  <pre><code>class Admin_Model_DbTable_Inv extends Zend_Db_Table_Abstract
  {
      protected $_name = 'test';
      public function updateproductstock($qty,$pid)
      {
          $data = array(
              'stock' =&gt; 'stock - 2'
          );
          $this-&gt;_db-&gt;update($this-&gt;_name, $data, product = '.$pid.');
      } 
  }
  </code></pre>
  
  <p>Here,I want to subtract my qty from stock.For example 2 will be qty. <code>qty</code> will be dynamic data .How can i use zend update here. kindly help.</p>
  
  <p>Updated my post</p>