Announcement

Collapse
No announcement yet.

query_read function to display detailedtime

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Abdulla Ashoor
    replied
    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

    Leave a comment:


  • avatar12345
    replied
    Can someone assist? Thanks.

    Leave a comment:


  • avatar12345
    started a topic query_read function to display detailedtime

    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>';


Related Topics

Collapse

Working...
X