joe: Forum: Anzeigen wo neue Posts gemacht wurden

Beitrag lesen

So ich habs jetzt so probiert.
Weiter weiß ich wirklich nicht mehr.

SELECT t1.threadid ,t1.threadtitel,t1.threadtype,t1.postcounter,MAX(thepost.thetime) AS lastpost  
FROM mainproject.board_thread AS t1  
  
LEFT JOIN (SELECT t3.thetime,t3.tid  
			 FROM mainproject.users_follow_disc AS t3  
			 WHERE t3.uid=".$_SESSION['auth_userid']."  
			 ORDER BY t3.thetime) AS thepost ON thepost.tid=t1.threadid  
  
LEFT JOIN mainproject.board_category AS t2 ON categoryname='".$tag."'  
	  
LEFT JOIN mainproject.board_post AS t4 ON t4.creationtime > lastpost AND t4.threadid=t1.threadid  
  
WHERE t1.categoryid=t2.categoryid  
GROUP BY t1.threadid,t1.threadtitel,t1.threadtype,t1.postcounter  
ORDER BY postcounter

Er sagt leider das es lastpost nicht gäbe. Es steht halt oben in der SELECT KLausel =/.
Hm .. wie komme ich nun an das Ergebnis mit der Maximalen Uhrzeit aus "thepost" ?