Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Multiple select dropdown - Column type 'SET' mandatory?

phpMyEdit General     Multiple select dropdown - Column type 'SET' mandatory?
Post new topic   Reply to topic    
 
hgw     Joined: 23 Jun 2008   Posts: 3  
Post Posted: 2008-06-23 17:29
Back to top  Reply with quote     

Hello,
I've read some posts here and also succesfully managed to create a dropdown with values lookup from another table (holzarten). What I can't find out is to make this a multiple select dropdown. I'm only getting a simple select, and in the source there's no 'multiple' atrribute in the select tag.
Code:

$opts['fdd']['t_holzarten'] = array(
  'name'     => 'T holzarten',
  'select'   => 'M',
  'maxlen'   => 26,
  'sort'     => true
);
$opts['fdd']['t_holzarten']['values']['table']    = 'holzarten';
$opts['fdd']['t_holzarten']['values']['column']   = 'h_id';
$opts['fdd']['t_holzarten']['values']['description']   = 't_holzart';


Maybe the database column for that multiple values has to be in MySQL type SET? But applying the set type I have to predefine the values which is confusing as the values should come from the 'holzarten' table. Probably I'm missing an important piece of MySQL and PhpMyEdit knowledge.

Thanks for a hint into the right direction!

 
hgw     Joined: 23 Jun 2008   Posts: 3  
Post Posted: 2008-06-27 08:41
Back to top  Reply with quote     

No solution, or isn't it possible?

I'm getting 5 error messages as cited in my first post, no matter how many data is retrieved from the table.

Thanks!

 
hgw     Joined: 23 Jun 2008   Posts: 3  
Post Posted: 2008-06-30 11:16
Back to top  Reply with quote     

Thanks,
I already did the phpMyEdit.Class.php correction. The mysql errors are fixed, they were due to another small problem.

Remains the multiple drop-down with looked up data .... I should have a multiple dropdown with lookup, the client is editing doors which are available in multiple wood surfaces, the wood surfaces should be editable in a different table and connected to the doors table via lookup.

So I can't put them as predefined values in an array in the doors table...

Thanks again for any ideas :-)

 
sba     Joined: 31 Jul 2008   Posts: 12  
Post Posted: 2008-07-31 08:14
Back to top  Reply with quote     

i had the same problem and it seems that 'values' with multiple-select is not working:

my solution: create the values2 array manually:

Code:

$res = mysql_query('SELECT * FROM t_holzarten');
foreach($res as $row){
   $woods[$row['h_id']] = $row['t_holzart'];
}
$opts['multiple'] = count($woods); //show all items



and then use simply:

Code:

$opts['fdd']['t_holzarten'] = array(
  'name'     => 'T holzarten',
  'select'   => 'M',
  'maxlen'   => 26,
  'values2'  => $woods,
);


 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy