planner_adm1

$row[tekst]

“;
echo “

    “;
    $sql=”SELECT user_name FROM planner_users, planner_result WHERE planner_result.event_id=$event_id AND planner_users.id=planner_result.user_id AND option_id=$row[id]”;
    $result2 = mysql_query($sql);
    while ($row2 = mysql_fetch_array($result2)) {
    echo “

  • $row2[user_name]
  • “;
    }
    echo “

“;
}
}

if ($action == “ubesvaret”) {
$sql=”SELECT id, tekst FROM planner_options WHERE event_id=$event_id ORDER BY starttid ASC”;
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
echo “

$row[tekst]

“;
echo “

    “;
    $sql=”SELECT id, user_name FROM planner_users WHERE event_id=$event_id”;
    $result2 = mysql_query($sql);
    while ($row2 = mysql_fetch_array($result2)) {
    $sql=”SELECT count(*) as antal FROM planner_result WHERE event_id=$event_id AND user_id=$row2[id] AND option_id=$row[id]”;
    $result3 = mysql_query($sql);
    $row3 = mysql_fetch_array($result3);
    if ($row3[antal] == 0) {
    echo “

  • $row2[user_name]
  • “;
    }
    }
    echo “

“;
}
}

?>