$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 , username from users where user_id = '$userid' order by stamp desc";
I just corrected the syntactical error in your query... that is the AND keyword should be replaced by ,.
,