66
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?