On Jan 16, 5:37 pm, mona <[email protected]> wrote:
<snip>
> if (empty($this->data)){
> if (!$id){
> $this->Session->setFlash('Invalid id for Entry');
What is that supposed to do? You won't find that sort of check in the
blog tutorial or baked code.
> $this->redirect('/entries/index');
> }
> $this->data = $this->Entry->read(null, $id);
> }
> else{
> $query=mysql_query("select max(counter) from entries");
> $row=mysql_fetch_array($query);
> $co=$row[0]+1;
> $q=mysql_query("update entries set counter=$co where id=$id");
why is your code using mysql_query at all, and in a controller to
boot?
AD
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---