On Mon, Mar 30, 2009 at 11:01 AM, joshua <joshokn@gmail.com> wrote:
Actually debug info before I call:
//CODE
debug($data);
$this->Task->saveAll($data , array('validate'=>'first'));
//END
###################################
Array
(
[Task] => Array
(
[user_id] => 128
[title] => simple task
[priority] => '0'
[forgold] => '0'
[status] => 100
[description] => simple task
[createdtime] => 2009-03-30 02:55:58
)
[Tasktype] => Array
(
[0] => Array
(
[type_id] => 27
)
)
)
###################################
But I can find this SQL under this page.
//SQL
INSERT INTO `tasks` (`user_id`, `title`, `priority`, `forgold`, `status`, `description`, `createdtime`) VALUES (128, 'simple task', 1, 1, 100, 'simple task', '2009-03-30 02:55:58')
//END--On Mon, Mar 30, 2009 at 10:48 AM, brian <bally.zijn@gmail.com> wrote:
What does $this->data look like right before $this->Task->save()?
On Sun, Mar 29, 2009 at 9:56 PM, joshua <joshokn@gmail.com> wrote:
> I am sure I got the expected value before saving it.
> Below is my tasks table structure. When I try to save 'priority' or 'gold',
> both of them are failed.
> #####################################
> CREATE TABLE `tasks` (
> `id` int(10) unsigned NOT NULL auto_increment,
> `user_id` int(11) NOT NULL,
> `title` varchar(50) NOT NULL,
> `priority` tinyint(1) default '0',
> `gold` tinyint(1) default '0',
> `status` smallint(3) default '0',
> `description` text,
> `createdtime` datetime default NULL,
> `modifiedtime` datetime default NULL,
> `deleted` tinyint(1) default '0',
> PRIMARY KEY (`id`),
> FULLTEXT KEY `title` (`title`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
>
> #####################################
>
> On Mon, Mar 30, 2009 at 1:33 AM, brian <bally.zijn@gmail.com> wrote:
>>
>> What does your table schema look like? And, what other values are you
>> trying to save? If you place Debugger::log($this->data) just before
>> your save call, do you see the expected value in your debug.log?
>>
>> On Sun, Mar 29, 2009 at 12:07 PM, joshua <joshokn@gmail.com> wrote:
>> > When I try to save a model with a field named 'priority', the value in
>> > this
>> > column is always 1. I am not sure it is the fault of cake or not. Any
>> > body
>> > knows?
>> >
>> > On Mon, Mar 30, 2009 at 12:04 AM, joshua <joshokn@gmail.com> wrote:
>> >>
>> >> It seems we couldn't use the 'object' as a method for our controller.
>> >> Got the warning:
>> >> there is no method 'object' in controller XXX .
>> >> Changed to 'object2', it works fine.
>> >> Is there a keyword list that we couldn't use in our controller?
>> >> --
>> >> Thanks
>> >> Joshua
>> >
>> >
>> >
>> > --
>> > Thanks
>> > Joshua
>> >
>> > >
>> >
>>
>>
>
>
>
> --
> Thanks
> Joshua
>
> >
>
Thanks
Joshua
--
Thanks
Joshua
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment