2008年8月2日星期六

[fw-mvc] Populate drop-down list from database table

I'm new to Zend, and I'm trying to work out how to populate an HTML drop-down list from a SQL table easily (without having to write a bucket load of code)

Searching the list I found http://www.nabble.com/how-to-use-fetchPairs()-td17545498.html - but this talks about sloctables which I don't know about.

I also discovered http://www.zfforums.com/zend-framework-components-13/databases-20/how-do-i-fill-zend-form-select-db-769.html but this talks about fetchpairs, which appears to be something extra to standard PHP/Zend database APIs.

Is there an easy way to populate a drop-down list from a SQL table in Zend framework/PHP?

Thanks,

GTG

没有评论: