my apologies.

could someone *please* have a look and see if they know what the
solution might be.

the queryData doesn't seem to be updated in the calling function even
though I'm using the &...

I'm pretty sure it will be something simple, just need a prod.

thanks again,
mikee

On 23/02/07, Mikee Freedom <[EMAIL PROTECTED]> wrote:
> afternoon all,
>
> a very simple one. all i would like to do is make sure certain fields
> are being included in any read / find / findAll. Could someone have a
> look at the code and see where my problem might lie?
>
>     function beforeFind(&$queryData)
>     {
>         if (!empty($queryData['fields']))
>         {
>             foreach ($this->fieldsRequired as $required_field)
>             {
>                 if (!in_array($required_field,$queryData['fields']))
>                 {
>                     $queryData['fields'][] = $required_field;
>                 }
>             }
>         }
>         return true;
>     }
>
> Where $this->fieldsRequired is :
>
>     var $fieldsRequired = array(
>
>         'file_location_live',
>         'file_location_temp',
>         'file_location_backup'
>
>     );
>
> Thanks fellas, much appreciated.
> mikee
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to