> here my question comes:
> as more ppl are added in the tags table i added another column
> tag_id       name            familyname
> ----------------------------------
> 1             David            Beckham
> 2             John             Terry
> 3             Christano       Ronaldo
> 4             David            Terry
>
> Since the controller create a key value pair (tag_id and name only), so now
> there are 4 options which are David, John, Christano and David. There are 2
> David now!
>
> I would like to add another input for family name in the view. Sth like
> <tr>
> <td valign=top>Who are tagged (Name)</td>
>        <td><?php echo $form->input('Tag.Name' ,array('label'=>false)); ?></td>
> </tr>
> <tr>
> <td valign=top>Who are tagged (Family Name)</td>
>        <td><?php echo $form->input('Tag.FamilyName' ,array('label'=>false));
> ?></td>
> </tr>
>
> But I dun know how to make it works?
> I know I can combine the name and family name such that one tag_id is mapped
> to one name to solve this problem. But I just wanna know whether it is
> possible for one key to be mapped with more than one values.
>

Absolutely not. The entire purpose of an array key is to unambiguously
point to a single value. Just as Tags must be unique. If they are not
there's no point in using them as they'll be useless.

If you want to update your tags to incorporate the family name, append
it to the value of name.

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