Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

how put in a select the value of a db table


Reply

625 Views

Avatar
bebabeba

31 October 2008 at 9:46pm Community Member, 192 Posts

Hi!
I create a select as explain in guide.
My problem is tha I connect silverstripe to an external database. Here I have "Country" table whit the name of word country. I want to put this value in my select.
To create select I use:
new DropdownField($s, 'Nazione', array(
            'Italia'=>'Italia',
            'Englad' => 'England'
            )),
but write all the value is too much!
Can you help me to solve this problem?