Hi, I've got a problem here, and it's driving me nuts!

Everytime I run this code, a blank row is created in the 'items' DB
table. The 'items' id field is set to auto_increment. And there are
also some validation rules set in the model, but in this case, they
won't work:

                $this->Item->recursive = 0;
                $this->Item->id = $idItem;
                $itemViewed = $this->Item->read();
                $updatedViews = $itemViewed['Item']['views'] + 1;
                $itemViewed['Item']['views'] = $updatedViews;
                $this->Item->saveField("views", $updatedViews);
                $this->set('item', $itemViewed);

Please, someone help me, it's a very strange issue.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to