2

I have several different pieces of info in separate profile2 forms. When I run the view to display the data I want, it looks like this:

Profile      UID PID IID  Name         Email                     Membership
Main Profile 124 15  1237 Bernardo Lee BernardoLLee@teleworm.us 
Membership   124 76                                              Basic Member

The Membership and Main Profile show up on different rows for the same users. I was hoping that by not displaying Profile and PID, the data would show up on one line like:

UID IID  Name         Email                     Membership
124 1237 Bernardo Lee BernardoLLee@teleworm.us  Basic Member

But it still shows on two lines.

Also, I can't figure out where the "profile2" table is. The query in Views is

        SELECT profile.type AS profile_type, profile.uid AS profile_uid, profile.pid AS
     pid, 'profile2' AS field_data_field_ibo_number_profile2_entity_type, 'profile2' AS
     field_data_field_first_name_profile2_entity_type, 'profile2' AS
     field_data_field_last_name_profile2_entity_type, 'profile2' AS
     field_data_field_primary_email_profile2_entity_type, 'profile2' AS
     field_data_field_cell_phone_profile2_entity_type, 'profile2' AS
     field_data_field_globalnet_membership_plan__profile2_entity_, 'profile2' AS 
    field_data_field_monthly_educational_book_profile2_entity_ty
        FROM 
        {profile} profile
        INNER JOIN {users} users_profile ON profile.uid = users_profile.uid
        WHERE (( (profile.type IN  ('main', 'knowing_you_better', 'website_info', 
 'credit_card_info', 'membership', 'line_of_sponsorship')) ))
        ORDER BY profile_uid ASC

but when I drop it into mysql, it's an invalid query

I don't understand the {profile} and {users} nor the 'profile2' I was hoping to rewrite the query if I can't get views to directly display what I am looking for.

  • could you let us know how you have created the view? – Mohammed Shameem Jan 26 '13 at 5:45
2

I am not sure how you have created the view. But this would be the method to go about it

  1. Create a view of the user.
  2. Create two relationship of the type User : Profile One for the Main Profile and the other for the Membership
  3. Add the required fields choose The corresponding relationship for each of the fields, that is choose the one we created for Main Profile for the fields with in Main Profile and Membership for the ones in the membership.

That should bring it all in one line.

You might not be able to have the Profile and PID like in the first out put but I guess you dont want that .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.