Announcement
Collapse
No announcement yet.
query_read function to display detailedtime
Collapse
X
-
Hello,
there is no column in post table called time. it's called dateline. so instead of $post[time] you have to $post[dateline]
However, the dateline is in timestamp format. vbdate function can help you to convert it. More information can be obtain from vbulletin.org
-
query_read function to display detailedtime
Hi, I have this code query and I dont seem to be able to display time. It only show me the latest post title but not time.
I want something like that. "ABCBD title, Today, 11.02am". Can anyone advise what is wrong with this queries? Thanks.
//Latest post
$post_get = vB::$db->query_read("
SELECT * FROM ".TABLE_PREFIX."post p, ".TABLE_PREFIX."thread th
WHERE th.threadid = p.threadid AND forumid NOT IN (28,29) ORDER BY p.postid DESC
LIMIT 20");
//Latest post
$output_bits .='<div id="tab-4" class="tab-content document"><div class="document"><ul>';
while($post = vB::$db->fetch_array($post_get))
{
$i++;
if($i%2 != 0) $cl ='li-1'; else $cl ='li-2';
$output_bits .= '<li class="'.$cl.'">'.$post[title].' ' .$post[time].' <a rel="nofollow" href="showthread.php?goto=newpost&t='.$post[threadid].'"> read post »</a></li>';
Tags: None
Related Topics
Collapse
-
by EuropeistHow can i edit the latest post module to show only the title of the post and not the text?
-
Channel: Support Issues & Questions
Thu 7th Mar '13, 10:34pm -
Leave a comment: