Start by using these two functions:
function beforeSave()
{
//manipulate data being saved for your model, here.
//go back up to the parent beforeSave function
return parent::beforeSave();
}
function beforeFind($queryData)
{
//add conditions or or other query info the $queryData here.
//return the query data you've modified
return $queryData;
}
Remember, that if you find yourself manipulating data within the
controller, you're probably doing something that could be done more
efficiently and with more chances for reuse if it were performed from
the model.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---