Dear All,

I'm a beginner with CakePHP (and therefore new to this group) and I'm
currently facing a (basic) problem:

I have a database table with some information like the mobile phone,
status of a shipment (which is a TYNINT field in my mysql db), etc. I
want to know if there is a simple way to parse the value of the fields
directly in the model in order to have a more readable results in my
views. Here is a short example to be clear:

- My status fields has the following value in my db table: 0, 1, 2, 3
- my "business rule" is the following:
 - 0 = not yet processed
 - 1 = processing
 - 2 = shipped
 - 3 = delivered

How can change my model to include this "business logic" directly
there ? I don't want to parse the results in every views, because if
the logic change I will have to change it in every view.

Thanks in advance for your help, cheers, Simon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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