I've asked this question in IRC before, but still didn't get the right
solution. Here is the problem :
class PdfController extends AppController {
function view($id)
{
//$this->Pdf->id = $id;
//$this->Pdf->saveField('viewed', 'Pdf.viewed + 1');
$this->Pdf->updateAll(array('viewed' => 'viewed + 1'));
$pdf = $this->Pdf->view($id); // Taken from view() function in Pdf
Model.
//debug($pdf);
$this->set('pdf', $pdf);
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---