Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
$sql = "SELECT count(id) AS cnt, MIN(toread) AS toread, MAX(flagged) AS flagged, MAX(datum) AS datum, id, displayname FROM (
(SELECT a.toid AS id, 1 AS toread, 0 AS flagged, a.datum AS datum, b.".($config->realnames ? "name" : "username")." AS displayname FROM #__uddeim AS a LEFT JOIN #__users AS b ON a.toid=b.id WHERE a.fromid=".(int)$myself." AND a.totrashoutbox=0 )
UNION
(SELECT a.fromid AS id, toread, flagged, a.datum AS datum, b.".($config->realnames ? "name" : "username")." AS displayname FROM #__uddeim AS a LEFT JOIN #__users AS b ON a.fromid=b.id WHERE a.toid=".(int)$myself." AND a.totrash=0 AND a.archived=0 AND a.delayed=0 )
) AS comb_table".$filter." GROUP BY id".$sort." LIMIT ".(int)$limitstart.", ".(int)$limit;
Please Log in to join the conversation.