Published in: PHP
public function listAllMyPublishedArticles($uid) { $query="SELECT article_tbl.aid,header,introduction,body,published_state, FROM_UNIXTIME(published_date, '%d/%m/%y %H:%i') as published_date FROM article_tbl, user_has_art_tbl WHERE user_has_art_tbl.uid= $uid AND user_has_art_tbl.aid = article_tbl.aid AND article_tbl.published_state = 1 ORDER BY aid desc"; return $query; }
Comments
Subscribe to comments
You need to login to post a comment.

the "FROMUNIXTIME(publisheddate, '%d/%m/%y %H:%i') as published_date" is what I wanted to save, and remember.
I always store dates as unix timestamp, somehow I feel this give me more flexibility, but I guess that's just me..