1
theCat
Select box for general setting
  • 2004/3/8 8:46

  • theCat

  • Just popping in

  • Posts: 77

  • Since: 2004/2/2 2


The normal way for select box in general settings is:
$modversion['config'][1]['formtype'] = 'select';
$modversion['config'][1]['valuetype'] = 'int';
$modversion['config'][1]['default'] = 10;
$modversion['config'][1]['options'] = array('5' => 5'10' => 10'15' => 15'20' => 20'25' => 25);
I search to customize a select box with the result of query:
$modversion['config'][3]['valuetype'] = 'int';
$modversion['config'][3]['default'] = 10;
global 
$xoopsDB;
$sql 'SELECT desc FROM '.$xoopsDB->prefix("mytable");
$result=$xoopsDB->query($sql);
...???
$modversion['config'][1]['options'] = ???
I have tryed with a lot of methods (while (list($desc)=..., while ( $myrow =..., push_array,...)but neither will work.
Is it possible ? Or dou you now a module who use a similar method?