Hi,
I’m currently doing my first Phalcon project. I have a problem with updating records. only the record with ID 1 is updated?
public function edithAction(){ $postId = $this->dispatcher->getParam('postId'); $article = Articles::findFirst($postId); Phalcon\Tag::prependTitle('Edith Article'); \Phalcon\Tag::setDefaults(array("title" => $article->getArticleTitle(), "date" => $article->getPostDate() ,"articleDesc" => $article->getArticleDescription(), "article" => $article->getArticleContent())); if ($this->request->isPost()) { $article->setArticleTitle($this->request->getPost("title")); $article->setPostDate($this->request->getPost("date")); $article->setArticleDescription($this->request->getPost("articleDesc")); $article->setArticleContent($this->request->getPost("article")); $article->update(); $messages = $article->getMessages(); if (count($messages)) { $this->flash->error("Umh, We can't update article right now."); return $this->dispatcher->forward(array( 'controller' => 'admin', 'action' => 'search')); } else { $this->flash->success("Great, article was updated successfully!"); return $this->dispatcher->forward(array( 'controller' => 'admin', 'action' => 'search')); } }}