Hi everyone, just wondering how i can convert a time() that has been sent to a database to a readable date?
Albino said:date("d-m-Y", $row['time']);
where $row['time'] is the value from the database, hope that helps a bit
yuvanextgen said:liam u asked the question right?
then y urself answering it
sdsinc said:Something like this:
PHP:select date_format(lastdate,'%d-%b-%Y %H:%i') as post_date from [table] order by lastdate desc
For performance reasons it would be best to do the sorting from SQL, not in PHP code.
mysql_query("SELECT * FROM `forum_topics` WHERE `forumroot` = '" . $_GET['f'] . "' AND `sticky` = '1' ORDER BY `lastdate` DESC");
