from_unixtime sql

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  1. public function listAllMyPublishedArticles($uid) {
  2. $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";
  3. $query=mysql_query($query)or die(mysql_error());
  4. return $query;
  5. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.