Minor corrections below
Unless someone has a better idea what about: (p.s. didn't test this so
read it as pseudo code)

foreach ($sonditions['Equipment'] as $field=>$value ) {
    if(!empty($value))
        $arrconditions['Equipment.'.$field]=$value;
}
findAll($arrconditions,....

hashkash wrote:
> Hi!
>      I searched the group for my problem but in vain.  Sorry if this
> is redundant.
> I have created a search form having 4 fields to be filled up.  I would
> like to base my search only on fields that have been filled up.With my
> current findall() Im not able to do so.
> How do I build the array string based on filled up fields?
> I have assigned a buildsearch value i.e if the field is entered = 1
> else = 0.In regular PHP i can create a buildsearchstring function but
> with cake Im unable to figure out how to do so.
>
> This is my findall()
>
> $this->set('results', $this->Equipment-
>   
>> findAll(array('Equipment.owner'=>$conditions['Equipment']
>>     
> ['owner'],'Equipment.incharge'=>$conditions['Equipment']
> ['incharge'],'Equipment.eqno'=>$conditions['Equipment']
> ['eqno'],'Equipment.type'=>$conditions['Equipment']
> ['type']),'',"Equipment.owner ASC",'','',0));
>
> Hoping for some help!
> Thanks!
> Kashyap
>
>
> >   



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