更新参数中的错误codeigniter habdesvalortot = habdesvalortot+参数
$query2 = $this->db->get_where('habdesempleados',array('HabDesMes'=>$this->input->post('Mes') , 'EmplRut'=>$this->input->post('Rut'),'HabDesAno'=>$this->input->post('Ano'), 'HDTipo' =>'H' , 'Imponible' =>'True' ));
// $query2 = $this->db->get();
if($query2->num_rows() > 0){
//$this->db->set('HabDesValorTot', '`HabDesValorTot`+ 1', FALSE);
$parametro = 1;
$this->db->set('HabDesValorTot', '`HabDesValorTot` * $parametro', FALSE);
$this->db->update('habdesempleados');
}
错误更新habdesempleados
set habdesvalortot = habdesvalortot
* $ parametro
filename:c:/wamp64/wwww/novatek/novatek/system/system/database/database/db_driver.php
line:69111
$query2 = $this->db->get_where('habdesempleados',array('HabDesMes'=>$this->input->post('Mes') , 'EmplRut'=>$this->input->post('Rut'),'HabDesAno'=>$this->input->post('Ano'), 'HDTipo' =>'H' , 'Imponible' =>'True' ));
// $query2 = $this->db->get();
if($query2->num_rows() > 0){
//$this->db->set('HabDesValorTot', '`HabDesValorTot`+ 1', FALSE);
$parametro = 1;
$this->db->set('HabDesValorTot', '`HabDesValorTot` * $parametro', FALSE);
$this->db->update('habdesempleados');
}
Error UPDATE habdesempleados
SET HabDesValorTot = HabDesValorTot
* $parametro
Filename: C:/wamp64/www/novatek/system/database/DB_driver.php
Line Number: 691
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

strong 变量与串联操作员('。')
您应该串联'
habdesvalortot
*'字符串与 $ parametroYou should concatenate '
HabDesValorTot
* ' string with $parametro variable with the concatenation operator ('.')Try this