Doctrine query
HI All,
I am using doctrine in my project... now i am trying to update an already existing query.I am getting some DB exception..can anyone tell me what ia wrong in my code
$q = Doctrine_Query::create();
$campaign->update('TableName')
->set('name' , $args['name'])
->set ('credit' ,$args['credits'])
->set('comments' ,$args['comments'])
->where ('id = 2')
->execute();
rati
Junior Poster in Training
78 posts since Aug 2006
Reputation Points: 45
Solved Threads: 1
Why are you creating the query with $q but then using $campaign? A doctrine update should look like
Doctrine_Query::create()->update('Table')->set('field','bound_value')->where('id = ?',$bound_id)->execute()
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268