$sql = \"select body, stamp from posts where user_id = \'$userid\' order by stamp desc\";
NOTE: the above query works fine. What I want to do is also s
$sql = " select body, stamp from posts where user_id = '$userid' order by stamp desc UNION ALL select body, stamp from username where user_id = '$userid' order by stamp desc ";
http://dev.mysql.com/doc/refman/5.0/en/union.html