CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Problem with relationship views
Pages: [1]

Author Topic: Problem with relationship views  (Read 1387 times)

dschafer

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 3
    • Backoffice Thinking
  • CiviCRM version: 3.2.3 - 4.4.4
  • CMS version: Drupal 6.x, 7.x, Wordpress
  • MySQL version: 5.1.x - 5.5.x
  • PHP version: 5.2.x - 5.4.x
Problem with relationship views
February 01, 2010, 05:05:00 am
I was trying to create a relationship view following the simple example in http://forum.civicrm.org/index.php/topic,7516.0.html

but received the following error:

user warning: Column 'id' in field list is ambiguous query: SELECT id, civicrm_relationship.description AS civicrm_relationship_description, civicrm_contact_civicrm_relationship.id AS civicrm_contact_civicrm_relationship_id, display_name FROM cams_civi.civicrm_relationship civicrm_relationship INNER JOIN cams_civi.civicrm_contact civicrm_contact_civicrm_relationship ON civicrm_relationship.contact_id_a = civicrm_contact_civicrm_relationship.id INNER JOIN cams_civi.civicrm_contact civicrm_contact_civicrm_relationship_1 ON civicrm_relationship.contact_id_b = civicrm_contact_civicrm_relationship_1.id LIMIT 0, 10 in /home/webadmin/westohioumc.virtual.vps-host.net/html/modules/acquia/views/includes/view.inc on line 765.

So far the relationship integration seems very confusing. I'm trying to create a result equivalent to the following sql but have had no luck.

Here is the basic sql:

select t.name_b_a, lm.display_name
from civicrm_relationship r
inner join civicrm_relationship_type t on (r.relationship_type_id = t.id)
inner join civicrm_contact lm on (r.contact_id_a = lm.id)

Thanks

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Problem with relationship views

This forum was archived on 2017-11-26.