I'm having some trouble inserting new items into the database as the
argument of a controller is causing it to update instead of insert.

The URL is /forums/new_topic/3 where the argument 3 refers to the id of
forum the topic will belong to. The first time I insert a new topic
with that URL it creates a new topic with the id of 3.

However the next time I try adding a topic to that forum using the
aforementioned URL it will just update the last post.

At no point am I assigning the id number of the topic, so I am not sure
how it comes to inherent the id number of the controller argument.

I've noticed in the SQL logs that cake is checking if a topic with the
value of the argument exists - eg SELECT COUNT(*) AS count FROM `posts`
WHERE (`id` = 3) - and if so it is doing the updates.

My problem seems similar to this one:
http://groups.google.com/group/cake-php/browse_thread/thread/b4eeaf674bad91ad/


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to