Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 XThreads field on Index last post
Lilith Offline
Junior Member
**
Posts: 1
Joined: Feb 2024
Post: #1
XThreads field on Index last post
Hello,

I was searching around but did not find anything fitting my needs.


In certain forums I have a field where people can put in triggers for others to get warned if needed. Now I want to show that field on Index where last post informations are.

At the Moment my code looks like the following, but it now shows me all triggers from all threads. How do I tell the code that if last post is made in Thread 1 it should only show the Trigger from Thread 1?

PHP Code:
<?php
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."forums f ON (p.fid=f.fid) LEFT JOIN ".TABLE_PREFIX."threadfields_data td ON (td.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."threadprefixes tp ON (tp.pid=t.prefix)");
while($data = $db->fetch_array($query))
            {
    echo "{$data['iptrigger']}";}?>


Thank you <3

02-23-2024 10:44 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: