sure...
in the model in the afterFind() callback:
if (empty($xyz)) { $xyz = 'No Motto';}
On 23 Jul., 00:12, David <[email protected]> wrote:
> Let's say I have a User model and they have on Profile model. Within
> the profile model there is a motto field. If the model field is null,
> is there anyway in the Profile model I can return the string "No motto
> entered" without doing manual checks? Like some sort of 'if field is
> null' callback or something.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---