Quantcast
Channel: Cakephp: Update records without refering the primary key - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Cakephp: Update records without refering the primary key

$
0
0

I am trying to update number of records with respect to their thread Id. Here is a problem my id_thread field is not a primary key . But as far as I know cakephp only supporting updating content relating with primary id .

Used code

$this->contact->id_thread = $id;        $this->Contact->saveField('is_read','y');

But this is not worked for me. Any ideas ?

My DB structure

id   |id_thread |  id_sender| is_read | status_______________________________________________1    | 2        |   2       | n       | 12    | 2        |   1       | n       | 1  

Viewing all articles
Browse latest Browse all 3

Trending Articles