Search code examples
phpsymfonydoctrinedbal

Iteration DBAL Doctrine


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


Solution

  • Found it:

       $conn->executeUpdate("UPDATE testSET feld_number=feld_number+1 WHERE art = ? AND feld = ? AND feld_key = ?", array('SYSTEM','XML',0,));