I have a table 'event' as follows
login primary key,
foreign key(pastevent_login, pastevent_entrytime) references event(login,entrytime)
if the event is previously arranged then past event login and entry time is stored which is from a same table,
now when any event is displayed i want to display all past events associated with it as well as if any past event is displayed i want to display all its past as well as its future events , i want to achieve this if possible with single query please help..
i am using mysql 5.x