If you happened to select records in key value pair, try this way
$query = $this->select()
->from($this->_name, array('id', 'name'));
$this->getAdapter()->fetchPairs($query);
that will return
222 => "Velvom"
sharing some useful programming tips with other developers.
If you happened to select records in key value pair, try this way
$query = $this->select()
->from($this->_name, array('id', 'name'));
$this->getAdapter()->fetchPairs($query);
Copyright 2008 Splashpress Media | Converted by eBlog Templates | Blogging Pro Blogger | Designed by Design Disease
0 comments
Post a Comment