I'm in the unfortunate position of needing to fix a third-party plugin that was created under contract; the original developers are not available to fix it.

From within the plugin, I'll need to look up field data from a relationships field. e.g.: "shirts" has a relationship field that points to the "vendors" channel, which contains a field "email", so in php using the EE classes or raw SQL, I'd need to look up:


After a bit of Google'ing, I didn't find anything documenting the internal structure of relationship fields, or how this might be accomplished.

Any help would be appreciated!

1 Answer 1


You may need to query the exp_relationships table directly. It uses a lot of ids, so you'll have to know them in advance, but from your requirements, it sounds like that shouldn't be a big deal.

  • 1
    Thanks, it actually ended up being fairly easy to do. You were correct, I needed to access the relationships table directly. Feb 26, 2015 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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