Profile2 and creating Views

Events happening in the community are now at Drupal community events on www.drupal.org.
bodyblueprinter's picture

Hi All,
Having a hell of a time getting Profile 2 to display the fields I want.......Not familiar enough with Views I think. Got this error when trying to add relationships..

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '' ESCAPE '\') ))) subquery' at line 5

Any thoughts?
Tobin

Comments

Yuck, drupal is creating a

maryedith's picture

Yuck, drupal is creating a bad sql query.
There's an issue with a user view with relationship here http://drupal.org/node/1326252 but the error is different.

hahahahaha DETERMINATION!

bodyblueprinter's picture

Never Give Up, Never Surrender!

Sorry, finally found it. Relationships needed to be set
User: Profile
(Profile) Profile: User uid

way cool!

maryedith's picture

way cool!

That works, but... I had to

ergophobe's picture

That works, but...

I had to delete the Profile:FieldName fields from the view and add them back to get rid of the error. Perhaps just a cache clear would have done it.

So just to give the sequence
- add the User:Profile relationship
- add the Profile: User uid relationship
- Add fields and choose Profile as the relationship

Santa Cruz

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: