I am working on a blood bank mobile app.I seem to have stalled at the logic for matching donors to their respective blood_groups that can donate to them. Curently i have a database called test and 3 tables: health_profile, contact_info and register.
register has (id,firstname,lastname,email,username and password)
health_profile has (id,username,blood_group,age and weight)
contact_info has (username, phone, address, town).
I need the php script to get the value of blood_group of the current user and and display the contact_info all the other users in the database that can donate to them.
O- can be donated by O-
O+ can be donated by O+ and O-
A- can be donated by A- and O-
A+ can be donated by A+ A- O+ O-
B- can be donated by B- and O-
B+ can be donated by B+ B- O- O+
AB- can be donated by AB- B- A- O-
AB+ can be donated by AB+ AB- B+ B- A+ A- O+ O-