CodeIgniter Forums
Database Query Problem. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Database Query Problem. (/showthread.php?tid=47871)



Database Query Problem. - El Forum - 12-26-2011

[eluser]Unknown[/eluser]
I have a date field in the database . Inorder to get the year of the date I am using the SQL feature "YEAR(column_name)" . my problem is the query is executing but i am not able to echo it int the view file whenever i use $data-> YEAR(Column_name); it returns an error.