コード例 #1
0
ファイル: member.php プロジェクト: CPE16/web_swe
function Add($No, $isLast, $pdo)
{
    $id = getID($No, $pdo);
    $data = Fetch_Data($id, $pdo);
    $last = $isLast;
    $name = $data['Name'];
    $phone = $data['phone'];
    $email = $data['email'];
    memberList($No, $id, $name, $phone, $email, $last);
}
コード例 #2
0
ファイル: test1.php プロジェクト: CPE16/web_swe
function printMember($Number, $pdo, $last)
{
    $sth = $pdo->prepare("SELECT * FROM temp where id = {$Number} ");
    $sth->execute();
    while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
        $this_id = $row['test'];
        $sth = $pdo->prepare("SELECT * FROM students WHERE Student_ID = :id");
        $sth->bindParam(':id', $this_id, PDO::PARAM_STR);
        $sth->execute();
        while ($rows = $sth->fetch(PDO::FETCH_ASSOC)) {
            $name = $rows['Name'];
            $email = $rows['email'];
            $phone = $rows['phone'];
            memberList("{$Number}", "{$this_id}", "{$name}", "{$phone}", "{$email}", "{$last}");
        }
    }
}