Dieser Code kommt in das app_model.php /** * Get Enum Values * Snippet v0.1.3 * http://cakeforge.org/snippet/detail.php?type=snippet&id=112 * * Gets the enum values for MySQL 4 and 5 to use in selectTag() */ function getEnumValues($columnName=null, $respectDefault=false) { if ($columnName==null) { return array(); } //no field specified //Get the name of the table $db =& ConnectionManager::getDataSource($this->useDbConfig); $tableName [...]
function getNewest( $limit = 50 ) { $data = $this->find('all', array( 'order' => $this->name .'.id DESC', 'limit' => $limit) ); return $data; }