php - SELECT FROM_UNIXTIME(created, `'%Y-%m-%d'` ) AS day
高洛峰
高洛峰 2017-06-05 11:09:02
0
3
676
$this->db->select("FROM_UNIXTIME(created, '%Y-%m-%d' )  AS day")

......
The result of

ci is:

SELECT FROM_UNIXTIME(created, `'%Y-%m-%d'` ) AS day

How to avoid mysql’s timestamp function by adding the `` symbol

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
曾经蜡笔没有小新

Can you try escaping the single quotes

刘奇
    
    $this->db->select('FROM_UNIXTIME(created, "%Y-%m-%d" )  AS day');
洪涛
$this->db->select("from_unixtime(created,'%Y-%m-$d') as day",false)

Add false parameter

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template