Hi,
got it work with this query:
Code:
SELECT pmtext.pmtextid, pmtext.fromusername, pmtext.fromuserid, pmtext.dateline, pm.pmid, " . TABLE_PREFIX . "user.userid, " . TABLE_PREFIX . "user.usergroupid,
COUNT(pmtext.fromuserid) AS fromusertotal FROM " . TABLE_PREFIX . "pmtext AS pmtext
LEFT JOIN " . TABLE_PREFIX . "pm AS pm USING(pmtextid)
LEFT JOIN " . TABLE_PREFIX . "user ON (" . TABLE_PREFIX . "user.userid=pmtext.fromuserid)
WHERE pm.userid=$bbuserinfo[userid] AND messageread=0
GROUP BY pmtext.fromusername ORDER BY " . TABLE_PREFIX . "_user.usergroupid ASC
How got I the "2 Minutes ago" thing working? I just got "New PM from xyz, Today!".
Regards,
Tobi