Thanks euromark :) Always good to be clear on such things! I am just restarting CakePHP development, so I am not completely up to facts :D Enjoy, John
On 10 Aug., 11:28, euromark <[email protected]> wrote: > @john > only tinyint(1) is boolean > tinyint(2/3) is fine > > @abhimanyu bv > but 4 usually doesnt exist (tinyint has 255 values) > > use int(4)! > > On 10 Aug., 10:34, John Andersen <[email protected]> wrote: > > > > > The issue could be that you have defined the column as tinyint, which > > CakePHP consider as a boolean column, see the CakePHP book > > at:http://book.cakephp.org/view/1390/Automagic-Form-Elements > > In the table it is shown that tinyint is used for checkbox values, > > thus only 0 or 1 :) > > > Suggest you alter your column to be an integer instead. > > Enjoy, > > John > > > On 10 Aug., 08:34, abhimanyu bv <[email protected]> wrote: > > > > Hi john,new column has tinyint(4) and it has an index. and my code is > > > if ($this->Deal->validates()) { > > > $this->data['Deal']['admin_id'] = $this->Auth->user('admin_id'); > > > $this->Deal->create($this->data); > > > if ($this->Deal->save($this->data)) { > > > //my logic > > > > } > > > }- Skjul tekst i anførselstegn - > > > > - Vis tekst i anførselstegn -- Skjul tekst i anførselstegn - > > - Vis tekst i anførselstegn - -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
