Php Mysql – Code Needed Asap

I need a short bit of code to extract the country based on a reference number. The output is a php page.

I have one table called sb_countries which references all the countries as a number and i have another table sb_profile which contains over 50 fields with different information including a country field which contains the reference number from sb_countries

1)
sb_countries

id name
——————–

1 United States
2 Canada
3 United Kingdom
4 Afghanistan
etc
etc

2)

sb_profile
———————-

member id country

100 1
101 1
102 2
103 3
104 4

etc
etc

I have some existing code which needs to be updated so instead of the country field displaying a number.. i would like it to display the actual country name as referenced in sb_countries

The php template where the code must be inserted is attached

Leave a Reply

Your email address will not be published. Required fields are marked *