You can make you own method in the model that will query the DB. Then
you can make computation in your fields such as $this->data['Model']
['totalprice'] = $this->data['Model']['unitprice'] * $this-
>data['Model']['number']; Then you can use data['Model']['totalprice']
in your view (just an example)
hth

On Jan 13, 1:38 am, Tim <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm new to CakePHP and PHP5, i'm on v1.2 beta. I can successfully
> query the database and display data from the table, but i'd like to
> also show a calculated field. I had presumed I put it in the model,
> but it seems the data available in the view is just an array, not an
> object. Can anyone point me in the right direction to show calculated
> fields?
>
> Thanks
>
> Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to