Announcement

Collapse
No announcement yet.

Custom database query

Collapse
X
Collapse
First Prev Next Last
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom database query

    I have created a query that retrieves 5 groups under the caegories ID 6649950,6649951,6649952,6649953

    Right now, i have managed to display 5 groups from those categories only, and echo their permalink and title.

    But now i need to sort the query to make it display 5 groups under those specific categories, and order them by the number of discussions.

    Please let me know what i should add in the $sql
    Here is my current query:

    PHP Code:
    You need to be logged in to view the code. Login or Register now!
    Last edited by glennrocksvb; 02-13-2018, 07:31 AM. Reason: Removed sensitive db info

    #2
    Depends on what you want to order by. threads or posts:

    posts:

    HTML Code:
    You need to be logged in to view the code. Login or Register now!
    threads
    HTML Code:
    You need to be logged in to view the code. Login or Register now!
    Did not try but this should work.

    BTW: You should use nn.urlident as purl
    vBulletin-forum.de | Das deutschsprachige vBulletin 5 Forum! | Widgets, Free & Exclusive Mods and Tutorials in german.
    Navbar UnreadCount, New: Show hook-positions, Auto-close Threads, Users Latest Likes

    Comment


      #3
      Thank you verry much delicjous . I did not saw that column in the database. I applied your code, and it works flawless

      Comment

      Working...
      X