Get column names from a Zend_Db_Table object
If you need to get access to the column names of a Zend_Db_Table object (filtering a list of column names so that you discard any that don’t match up, for example) then as found on StackOverflow you can do the following:
$table->info(Zend_Db_Table_Abstract::COLS);
Which of course works from within the object itself, so you could write a method such as:
public function getCols() {
return $this->info(Zend_Db_Table_Abstract::COLS);
}
However unlike the documentation says, this does not appear to work…
//return $this->_cols;
Leave a comment
Categories
- Been knackered for days on end, long day with relatives today then most of tomorrow in the office doing downtime maintenance. I should rest!
- Dinner with my mom, couz and uncle (@ Gold Mine) http://t.co/pj4iA2Ul
- Om nom nom http://t.co/Kd2CIzs9
- I'm at Westfield London Shopping Centre (Shepherd's Bush, Greater London) w/ 13 others http://t.co/b2kCzQOG
- Off to see relatives (@ Northampton Railway Station (NMP) w/ 2 others) http://t.co/3ekCATN8
Recent Posts
- Use Zend_Log_Writer_Firebug to debug AJAX requests using Firebug
- Using Zend_Db_Profiler_Firebug to show database queries per page
- Checking $mixed parameter type for PHP methods
- “concrete5 cannot parse the PATH_INFO or ORIG_PATH_INFO information provided by your server.”
- Enable hibernation on HP MicroServer for Windows Home Server v1




