【发布时间】:2018-12-19 11:50:28
【问题描述】:
我正在尝试在我的 oracle 数据库中更新一个名为 RAC_PV 的表,但是当我运行我的应用程序时查询返回了该错误。我认为一切都是正确的,因为我在 sqldeveloper 上运行相同的查询(但使用手动值)并且当我将变量 $preco_medio 更改为像 1 这样的数字时,它可以在应用程序上运行。这是我的代码:
$preco_medio = number_format(($v_interna_real / $encargo + $vipe_real) / $v_interna_t + $vipe_t , 2, ",", ".") ;
sc_exec_sql("update RAC_PV set PRECO_MEDIO = $preco_medio where rac_anopv = {ano} and rac_mespv = {mes} and codempresa = $id_empresa and codpainel = 6 and cod_prod1 = '$id_produto'");
我的表名和列名是正确的并且检查过,我的变量像 {ano}、{mes}、$id_produto 和 $preco_medio 都是正确设置的。这个 sc_exec_sql("query here") 工作正常。也许问题出在 $preco_medio ?我从来没有使用过这个 number_format,但是当回显这个数字时,这个数字对我来说是正确的,比如 3,123.03 。
谁能帮帮我?
【问题讨论】: