I use the following method in Zend Framework DbTable models, you can port it to Phalcon php models easily
<?php
/**
* build select to read column definition for selected column
* @param string $column
* @return array
*/
public function getFieldOptions($column)
{
$sql = " SHOW COLUMNS ";
$sql .= " FROM " . $this->_name;
$sql .= " LIKE '" . $column . "'";
$result = $this->getAdapter()->fetchRow($sql);
if (!is_array($result)) {
$result = (array) $result;
}
// user regular expression to get option list from result
preg_match("=\((.*)\)=is", $result["Type"], $options);
// replace single quotes
$options = str_replace("'", "", $options[1]);
// explode string into an array
$options = explode(",", $options);
return $options;
}