Hi, currently working with this code.
$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());
The above code retrieves most of the data from tbl_enroll . Now I want to get some data about
tbl_er . tbl_enroll and tbl_er are associated with the student_id primary key , also connect to tbl_section once . tbl_er and tbl_section are associated with the section_id foreign key.
So far, I have been thinking of making multiple sql queries and using one mysql_query trigger, but it will not work because the trigger will not work with three sql queries.
source
share