0
我不知道发生了什么与此更新呼叫丢失,这是我的代码:Zend的DB更新值未设置
$table = new Application_Model_DbTable_ProductContaminant();
$db = $table->getAdapter();
$db->getProfiler()->setEnabled(true);
$data = array('value' => '999');
$where[] = $db->quoteInto('product_id = ?', $q['product_id']);
$where[] = $db->quoteInto('contaminant_id = ?', $k);
$table->update($data, $where);
print $db->getProfiler()->getLastQueryProfile()->getQuery();
和所述轮廓输出为:
UPDATE `product_contaminants` SET `value` = ? WHERE (product_id = '4802') AND (contaminant_id = 69)
为什么不'值'被填充?
好的,这似乎是正确的:[1] => 999.为什么它没有进入声明? – rladd 2012-07-10 19:25:40
当然,你不能更新一个空行,你可以吗?谢谢你的帮助Tim! – rladd 2012-07-10 19:57:37