Forum Discussion

skylinegtr's avatar
10 years ago

Help with API code

Hello! For some reason the following API only display posts from the tkb. It's supposed to show posting from tkb and forum. Has anyone run into this problem before?  Any help will be appreciated. Tha...
  • OlivierS's avatar
    OlivierS
    10 years ago

    skylinegtr I think it's probably best to run 2 querries then:

     

    <#assign messages_forum = rest("2.0","/search?q=" + "SELECT subject, view_href, post_time_friendly, board.id, teaser, author FROM messages WHERE board.id='forum' ORDER BY post_time DESC LIMIT 3"?url) />

    and

     

    <#assign messages_tkb = rest("2.0","/search?q=" + "SELECT subject, view_href, post_time_friendly, board.id, teaser, author FROM messages WHERE board.id ='tkb' ORDER BY post_time DESC LIMIT 2"?url) />