I am attempting to update a table where its id is equal 3 and to increase a column called updatecount for example if the value in the column was 3 let it add one and make it 4. Here is my table structure
Images
id | photo | updatecount |
1 xyz | 3
If I update the photo again where id is equal to 1 then the result becomes
id | photo | updatecount |
1 xyz | 4
Here is my controller definition
public function upDateAction(Request $request)
{
$intid = (int)$request->request->get('imageid'); //convert the request object to int
$image = new Image();
... //to do updating here
EDITTED
Here is my model >>>
/**
* @var string
*
* @ORM\Column(name="photo", type="string", length=255, nullable=true)
*/
private $photo;
/**
* @var integer
*
* @ORM\Column(name="updatecount", type="integer", nullable=true)
*/
private $updatecount;