I've got a database where a bunch of user profile information - name, address, city, interests, etc., are stored as separate values.
One set of tables in particular is giving me a headache. One table is called profile_fields. It lays out the possible values for user data. The important (to me) subset of the fields in this table are:
fid -- key
title -- the label that could be displayed, such as Last Name, First Name, Email Address
name -- the name of the field, such as profile_lastname, profile_firstname, profile_emailaddress
In another table, profile_values, there are only three fields:
So the combination of fid 1 and uid 200 would yield value Fred. FID 2 and uid 200 would be Smith.
Other tables have other user-specific information and they all use uid as the key. I'm trying to get information from those tied together with information from profile_values but because each fid/uid/value triplet is a separate record I'm not sure what the syntax is.