php mysql display filtered data in dynamic table based on table field value -


i have table named guestlist1 following columns:
id(int4), father(varchar60), father_going(int1), mother(varchar60), mother_going(int1), child_1(varchar60) , child_1_going(int1).

i need create html table data loaded dynamically guestlist1 table fields *_going=1.

example: have family 3 persons: david, alice, jonathan. after each name there number: 1, 0, 1. need create table same structure original include data fields column name ending _going=1.

:( please help! thank wey much!

tried select statement:

$query_guestlist ="select father guestlist (id=$id , father_going=1) union select mother guestlist (id=$id , mother_going=1) union select child_1 guestlist (id=$id , child_1_going=1)";

this ok includes fields not ones column name ending _going=1. if father going mother not, mother should not included.


Comments