public static function getLast($pair = 'btc_rur') { $buy = Exchange::model()->find(array('condition' => 'pair="' . $pair . '"', 'order' => 'dtm desc')); return $buy; }