こんにちは、現在このコードを使用しています
$qry_display = "
SELECT
student_id,
fname,
sex,
lname,
mname,
level,
photo,
birth_date,
birth_place,
address,
father,
father_occupation,
father_phone,
father_company,
father_degree,
mother,
mother_occupation,
mother_phone,
mother_company,
mother_degree,
adviser_id
from
tbl_enroll
where
student_id='$id'
AND level='$lvl'
";
$sql_display = mysql_query($qry_display) or die (mysql_error());
上記のコードは、ほとんどのデータをtbl_enrollからフェッチします。ここで、 tbl_erでいくつかのデータを取得したいと考えています 。tbl_enrollとtbl_erは Student_id の主キーで接続され、tbl_sectionにも一度接続されます。tbl_erとtbl_sectionは、section_id の外部キーで接続されます。
これまでのところ、複数の SQL クエリを実行して 1 つの mysql_query トリガーを使用することを考えていましたが、トリガーが 3 つの SQL クエリで機能しないため、機能しません。