storing to an array
Posted: Thu Feb 23, 2006 4:44 am
Hi,
I have a table with family ids, date of birth of students.
I want to find out if there is more than 1 sibling in a family AND who the oldest sibling is.
My table structure is as follows
tbl_family
familyid, int(11), auto increment
family_name, varchar(255)
tbl_student
studentid, int(11), auto increment
familyid, int(11)
student_date_of_birth, date
student_name, varchar(255)
How can I find who the oldest sibling in a family is and display the name of the oldest sibling next to the youngest sibling (if there are any siblings)?
Is the best way a query or store to an array?
I have a table with family ids, date of birth of students.
I want to find out if there is more than 1 sibling in a family AND who the oldest sibling is.
My table structure is as follows
tbl_family
familyid, int(11), auto increment
family_name, varchar(255)
tbl_student
studentid, int(11), auto increment
familyid, int(11)
student_date_of_birth, date
student_name, varchar(255)
How can I find who the oldest sibling in a family is and display the name of the oldest sibling next to the youngest sibling (if there are any siblings)?
Is the best way a query or store to an array?