I think by cake standars.. keep your controller lean and model fat :)
i will always remember this
On Jan 19, 4:08 pm, Guran wrote:
> I found the following code in the controller file:
>
> 1 function add() {
> 2 if (!empty($this->data)) {
> 3 $this->Expens
I think by cake standars.. keep your controller lean and model fat :)
i will always remember this
On Jan 19, 4:08 pm, Guran wrote:
> I found the following code in the controller file:
>
> 1 function add() {
> 2 if (!empty($this->data)) {
> 3 $this->Expens
I found the following code in the controller file:
1 function add() {
2 if (!empty($this->data)) {
3 $this->Expense->create();
4 if ($this->Expense->save($this->data)) {
5 $this->Session->setFlash(__('The
t; -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
>
> Of Guran
> Sent: January-18-10 5:18 PM
> To: CakePHP
> Subject: Capturing Field information before to compute before saving in
> database
>
> Thanks to all who
7;] + all your
other fields
return true;
}
Something like that
Dave
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Guran
Sent: January-18-10 5:18 PM
To: CakePHP
Subject: Capturing Field information before to compute before savin
In the controller:
$sum = 0;
$this->data['Modelname']['field1'] *= 0.55 ;
$this->data['Modelname']['hidden'] = $this->data['Modelname']['field1'] +
$this->data['Modelname']['field2'] + $this->data['Modelname']['field3'];
$this->Modelname->save($this->data) ;
2010/1/18 Guran
> Thanks to all wh
Thanks to all who have taken the time to help out without being
condescending or intimidating. I am a newbee and this help has
encouraged me to keep on learning CakePHP. Once I get good I will help
others on this forum.
Now on my expense submitter i am working on - there are field1,
field2, and fi