Mysql 中和同to_char 一样用法的函数
STR_TO_DATE()
$sql = " SELECT "; $sql .= " m_img,m_content,STR_TO_DATE(m_time,\"%Y-%m-%d\") as m_time "; $sql .= " FROM "; $sql .= " message "; $sql .= " ORDER BY message.m_time DESC "; $rs = $this->db->query($sql); $ClickArticle = $rs->result(); return $ClickArticle;