$sql = "SELECT reputation.*,user.username FROM " . TABLE_PREFIX . "reputation AS reputation LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid=reputation.userid) ORDER BY $order";