'Joining three (3) in MySQL tables and matching login account from other table

Can someone help me with this code? I'm trying to match the login account to the activities that conducted and its participants. Thank you in advance for the help.

    $useradmin = $_SESSION['username'];
    $datasql = "SELECT *
    FROM project_codes
    RIGHT JOIN activities ON project_codes.projects_id=activities.projects_id
    RIGHT JOIN data ON project_codes.projects_id=data.projects_id 
    ORDER BY project_codes.projects_code='$useradmin' ";
    $dataqry = mysqli_query($con, $datasql);
    while ($datarow = mysqli_fetch_array($dataqry)) {
       echo $datarow['act_title'];
       echo $datarow['act_date'];
       echo $datarow['f_name'];
       echo $datarow['l_name'];
       echo $datarow['birthdate'];

    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source