sorry I meant every time I need to update, like if description is
blank then insert null.
On Oct 29, 9:42 am, Caroline <cdotc...@xxxxxxxxx> wrote:
> Ok, fair enough, wrong example. Thanks for the tip, though.
> In my previous post, please replace the code by this (same outputs):
> $object = array();
> $object['Taxcode']['id'] = '63ae4d63efeecf1655e9b948fdc114a8';
> $object['Taxcode']['description'] = '';
> $data =
> I don't really want NULL in my description because it means I need to
> test for null every time I display the data.
> Thanks for your time.
> On Oct 29, 9:31 am, cricket <zijn.digi...@xxxxxxxxx> wrote:> On Thu, Oct 28,
> 2010 at 5:38 PM, Caroline <cdotc...@xxxxxxxxx> wrote:
> > > This is the code I run:
> > > $object = array();
> > > $object['Taxcode']['id'] =
> > > '63ae4d63efeecf1655e9b948fdc114a8';
> > > $object['Taxcode']['acctaxcollected_id'] = '';
> > > $object['Taxcode']['acctaxpaid_id'] = '';
> > > $this->Taxcode->save($object);
> > This is really bad practice, IMO. It appears that you're trying to set
> > a couple of foreign keys to the empty string. Either allow NULL on
> > those columns or change your business logic, perhaps saving this data
> > using an interim model.
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
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at