$this->ModelName->create() [[NB NOT created ]] does exactly what it says it will; it creates a new record. In any event, your two blocks of code are different; one has a create statement, the other does not. What you should check is whether there is an id element in your data array. If there is one, Cake will update that row. If there isn't one, Cake will create a new row.
Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Aug 2010, at 06:48, Techinfocomp.com wrote: > Hi, > > i am using 1.3.3 stable version. > > i am heaving problem with this version. > > let take an example:- > > if i do this > > $this->ModelName->save($this->data); > > this link will update my 1st row every time i run this. > > but > > if i do this > > $this->ModelName->created(); > $this->ModelName->save($this->data); > > this will create new record in table. > > why is this happen all the time, i never face this king of problem in > version 1.2. > > > now another problem. > > on my local pc i am running vista with xampp and cakePHP version 1.3.3 > > created filed in table is working fine. model automatically create > data for this column but it's not working on live server which is > running php 5 , my sql 5. > > > any help ? > > waiting for your reply > > Thanks > Harsh Gupta > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en