UPDATE contents_description SET hits = hits + 1 WHERE id = 14 执行错误

178.          
179.          $result = $this->db->query($sql);
180. 
181.          if($result===false)
182.              //echo "查询出错!{$sql}";
183.              JError("{$sql} 执行错误");
184.              
185.          $this->lastResult = $result;
186.          return $result;
187.      }
188.      
393.      public function incrField($conditions, $field, $optval = 1)
394.      {
395.          $where = $this->_db->getWhere($conditions);        
396.          $values = "{$field} = {$field} + {$optval}";
397.          $sql = "UPDATE {$this->tbl_name} SET {$values} {$where}";
398.          return $this->_db->exec($sql);
399.      }
400.      
401.      /**
402.       * 为设定的字段值减少
403.       * @param conditions    数组形式,查找条件,此参数的格式用法与getOne/getAll的查找条件参数是相同的。
24.          $language= $this->getLang();
25.          
26.          $contents_description = JLoadClass('contents_description');
27.          if($content_description = $contents_description->getOne(array('content_id' => $content_id, 'language' => $language))) {
28.              $cdid = intval($content_description['id']);
29.              $contents_description->incrField(array('id'=>$cdid), 'hits');
30. 
31.              $model = $content_description['model'];
32.              $model_obj = JLoadClass($model);
33.              $cond = array(
34.                  $model_obj->cpk => $content_id,
28.          eval($GLOBALS['G_JCONFIG']["dispatcher_error"]);
29.          exit;
30.      }
31. 
32.      // 执行用户代码    
33.      $__handle_controller->$__actionFunc();
34. 
35.      //显示前执行自定义代码
36.      JInject("before_display");
37. 
38.      // 控制器程序运行完毕,进行模板的自动输出
62.  if(count($server_info) > 1) {
63.      $server_domain = $server_info[count($server_info)-2];
64.      define('DOMAIN', $server_domain);
65.  }
66. 
67.  JStart();
68.  ?>