I am trying to list existing user profiles from the database but only one result is shown whereas there are multiple records.
$SQL_Users = "SELECT DISTINCT first_party_code FROM t_planning";
$RESULT = mysqli_query( $conn, $SQL_Users);
while($row_Users = mysqli_fetch_array($RESULT))
{
$data0 = "<ul class='list-unstyled users-list'>";
$SQL_User_Info = "SELECT title, first_name, middle_name, last_name, profile_image_name FROM t_employees WHERE employee_code = '" . $row_Users["first_party_code"] . "'";
$RESULT_Users = mysqli_query( $conn, $SQL_User_Info);
while($Users = mysqli_fetch_array($RESULT_Users))
{
$data0.= "<li data-toggle='tooltip' data-popup='tooltip-custom' data-placement='bottom' title='" . $Users["title"] . " " . $Users["first_name"] . " " . $Users["middle_name"] . " " . $Users["last_name"] . "' class='avatar pull-up'>
<img class='media-object rounded-circle' src='../uploads/users_profile_images/" . $Users["profile_image_name"] . "' alt='Avatar' height='30' width='30'>
</li>";
}
echo $data0.="</ul>";
mysqli_close($conn);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…