I've gotten my union statement to work the way I want it, but I cant seem to get it to order the 2 tables without erroring out.
$query = mysql_query("SELECT userid_2 FROM messages
WHERE userid_1='$dbid' UNION SELECT userid_1 FROM messages WHERE userid_2='$dbid'");
and I'm trying to incorporate ORDER BY date
into it but it doesn't seem to work.