Reputation: 336
As a CakePHP novice, I'm having this error:
Parse error: syntax error, unexpected T_DOUBLE_ARROW
I'm using CakePHP 2.0 and in my LogsController
I have:
$conditions = array("Title.id" => $id);
$currentUser = $this->Title->find('first', array('conditions' => $conditions), 'fields'=>array('user_id'));
Any idea, how I could solve this?
Upvotes: 1
Views: 1881
Reputation: 18979
You should place 'fields' in the array:
$currentUser = $this->Title->find('first', array('conditions' => $conditions, 'fields'=>array('user_id')));
Upvotes: 4