Hi stevenoone, I'm afraid you'll have to forgive my frustration, as
we've had a lot of problems with this lately, but if you abandon this
framework out of an inability to enter a search query into the text
box in the upper right-hand corner of the page, then I can't say I'll
be sorry to see you go.  This exact question has already been answered
here more times than I care to count.

http://groups.google.com/group/cake-php/browse_thread/thread/1bf118d0210426e2/94a7689cfeaed6d5?lnk=gst&q=habtm+multi+select&rnum=1#94a7689cfeaed6d5

On Mar 21, 2:03 pm, "stevenoone" <[EMAIL PROTECTED]> wrote:
> If I can't get this to work I'm going to have to abandon this
> framework. I've been developing dynamic websites for 10 years, but
> apparently this is just beyond me. I can't seem to get my multi-select
> lists to auto-populate correctly or update changes in the database. To
> get the auto-populate values I'm trying this in my serials_controller
>
> $this->set('mycomps',  $this->Serial->query("SELECT computer_id FROM
> computers_serials WHERE serial_id = $this->Serial"));
>
> and this in my edit.thtml
>
> $html->selectTag('Serial/Computer',$computer_options,
> $mycomps,array('multiple' => 'multiple'));
>
> it isn't working and I don't know why. If i hard-code "WHERE serial_id
> = 1" in the query it returns this array, but I don't see how to fit
> that into my selectTag.
>
> Array
> (
>     [0] => Array
>         (
>             [computers_serials] => Array
>                 (
>                     [computer_id] => 2
>                 )
>         )
>     [1] => Array
>         (
>             [computers_serials] => Array
>                 (
>                     [computer_id] => 5
>                 )
>         )
> )


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

Reply via email to