Symfony2: update query with query builder
Posted
by
Ichigo Kurosaki
on Stack Overflow
See other posts from Stack Overflow
or by Ichigo Kurosaki
Published on 2013-06-26T10:18:01Z
Indexed on
2013/06/26
10:21 UTC
Read the original article
Hit count: 165
symfony2
This is my query $id contains primary key and $status contains new status public function updateStatus($id,$status) { $qb=$this->createQueryBuilder('b') ->update() ->set('b.status',$status) ->where('b.id='.$id); echo $qb; return $qb->getQuery() ->getResult(); }
Problem I am facing is [Semantical Error] line 0, col 56 near 'Complete WHERE': Error: 'Complete' is not defined.
© Stack Overflow or respective owner