'Year(column_name) is not working in php(Yii framework)

** I want to print the year, but this is not working in PHP (Yii framework) **

<?php 
$year = PromotionalMaterial::model()->findAllBySql('SELECT Year(date_added) FROM 
      ip_productpromotionals GROUP BY Year(date_added)');
echo '<pre>';
print_r($year);
die($year);
?>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source