ich versuche grade mit einem DB Inhalt einen DropDownListe zu erstellen.
Dies mache ich mit folgendem Code:
Code: Select all
$national = array();
$query = "SELECT * FROM ".cms_db_prefix()."module_wsnational ORDER BY id";
$dbresult = $db->Execute($query);
while ($dbresult && $row = $dbresult->FetchRow())
{
$onerow = new stdClass();
$onerow->id = $row['id'];
$onerow->name = $row['name'];
print_r($onerow);
$national[] = $onerow;
}
$this->smarty->assign('prompt_national', $this->Lang('national'));
$this->smarty->assign('input_national',
$this->CreateInputDropdown($id, 'input_national',
$national, -1, ''));
Catchable fatal error: Object of class stdClass could not be converted to string in I:\xampp\htdocs\cms\lib\classes\module_support\modform.inc.php on line 303
Ich benutzt die Black Rock Version 1.2.3.
Hoffe es kann wer helfen....
lg
felixg