@calvin:
Thanks I am not that new to php, I know what an array and and array
index is
I can not du as you suppose as the data I need is not passed to the
$booking array.
$booking only contains the foreignkey in the field mealclassid
the field melclassKennung is not available.
I doublechecked this once by hardcoding it in and getting errors for
non available array index
once did the debug ($booking) to see what is contained.

This is why I asked for hot to do within cake.
I might do myselfe some php sql syntax and get my data from the db
directly
but this is no good style i was told.

My tryout using cakes find() also did not hit when I tired it inside
the view code
somhow I think it was the wrong place and might work if i do the
find() inside the controller

** might be a guess for the cake book: add in the api where to call
wich command **


cu

michael

On 15 Jun., 02:51, calvin <[email protected]> wrote:
> When you baked your models did you set the displayField property when
> cake bake asks you to? "requestName" and "mealclassKennung" are not
> standard display field names. Cake only knows to look for fields
> called "name" or "title" to use as display fields by default. If you
> want to display any other field, you need to tell cake which field to
> use.
>
> If you don't want to use cake bake to generate your views for you,
> then just edit the code manually. Replace $booking['mealclass_id']
> with $booking['mealclassKennung']. That's just basic PHP. If you can't
> understand what your code says, then I'd recommend getting a PHP book
> and skimming through it--particularly read the chapters about how
> arrays and associative arrays work. You're going to need to know that
> stuff to work with cake.
>
> On Jun 14, 11:26 am, mivogt-LU <[email protected]> wrote:
>
> > HI there,
>
> > if I choos in the index view the view button I get all my models data
> > and also the related models are shown somehow.
>
> > i.e. if I choos from customer-index: view I get the customer details.
> > I also get the orders he placed in some manner.
> > Sadly instead of an item name I am only shown the indexnumbers.
>
> > i.e.:
>
> > Related Bookings
> > Id      Name    Customer Id     Mealclass Id    Request Id
>
> > I would like to show up other fields instead of the id.
> > instead of requestID I prefer showing requestName
> > instead of mealclassID I prefer showing mealclassKennung
>
> > Might you please tell me how to change my code from
> >                         <td><?php echo $booking['id'];?></td>
> >                         <td><?php echo $booking['name'];?></td>
> >                         <td><?php echo $booking['customer_id'];?></td>
> >                         <td><?php echo $booking['mealclass_id']; ?></td>
> >                         <td><?php echo $booking['request_id'];?></td>
>
> > to something doing as I want?
> > I know I ll need to use the indexes to show up the fitting item out of
> > the database.
> > But still not that fit in cake to get the solution on my own.
>
> > Thanks in advance..
>
> > Michael

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