普通网友 2015-11-19 06:50
浏览 55
已采纳

迭代DBAL原则

Im trying to count a column one up with the dbal connection.

$conn->update("test ", array("feld_number"=>"feld_number+1"), array("art"=>'SYSTEM',"feld"=>'XML',"feld_key"=>0));

This is the error i get:

 An exception occurred while executing 'UPDATE test SET feld_number = ? WHERE art = ? AND feld = ? AND feld_key = ?' with params ["feld_number+1", "SYSTEM", "XML", 0]:
  ORA-01722: invalid number

How can i do this? Thanks

  • 写回答

1条回答 默认 最新

  • douya1855 2015-11-19 07:04
    关注

    Found it:

       $conn->executeUpdate("UPDATE testSET feld_number=feld_number+1 WHERE art = ? AND feld = ? AND feld_key = ?", array('SYSTEM','XML',0,));
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?