Hi,
Thanks for your reply, actually this is what I'm doing
in my view I'm calling it as
echo $form->input('jobposition_id',array('options'=>
$jobpositions,'multiple'=>'true','size'=>'5'));
But when I submt I get an SQL error and in the post data only the word
Array is passed like below (part of debug sql queries)
`jobposition_id` = Array,`jobtype_id` = '1'....
In the Model the Jobposition_id has a belongTo relation..
Any idea what would be wrong.. I'm using .1.2x
Thanks in advance
On Dec 10, 2:11 pm, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
> > I know the right approach for something like this is the HABTM, but I
> > really need to just store the selected options in a single database
> > field.
>
> Well, it is true that that you should have a proper many-to-many DB
> implementation, but if you REALLY want to hack it like that...
>
> All you need to do is create a multivalue select input. After that
> it's only a matter of hacking: your field will be (for example) comma-
> separated, so all you need to do is split and join selected values and
> select them in the view / insert them in the database.
>
> Hope that helps,
> dr. H.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---