用于获取数据库中的值的php脚本(如果存在)显示某个值

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 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-

You have to add some tables that include the relationships to be easier to agreggate the informations between the donors.

A graph database would be perfect to do that. http://neo4j.com/