Not sure what your after here.. but if your doing this in the
controller then try using

foreach($rows as $row) {
       if ($row['Model']['field'] == 0) {
               //do stuf...
       }
}

Is that any help?
Chris

On Mar 12, 4:07 pm, sebb86 <kahlc...@googlemail.com> wrote:
> Hello,
> in a foreach-loop to retrieve my data, i want to check a value from a
> field. So i can retrieve only the data, i want.
>
> I tryed:
> [code]
> foreach ($rows as $row => 'Model.field' => 0):
> [/code]
> In this example, i only want to retrieve all data-rows from model
> "Model", which has value 0 in the database field "field".
>
> This don't works.
> Can someone help me?
>
> (I want to to it that way. It's for an Excel output..., so i can't do
> that in my controller)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to