4 +--------------------------------------------------------------------+
5 | CiviCRM version 4.4 |
6 +--------------------------------------------------------------------+
7 | Copyright CiviCRM LLC (c) 2004-2013 |
8 +--------------------------------------------------------------------+
9 | This file is a part of CiviCRM. |
11 | CiviCRM is free software; you can copy, modify, and distribute it |
12 | under the terms of the GNU Affero General Public License |
13 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
15 | CiviCRM is distributed in the hope that it will be useful, but |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. |
20 | You should have received a copy of the GNU Affero General Public |
21 | License and the CiviCRM Licensing Exception along |
22 | with this program; if not, contact CiviCRM LLC |
23 | at info[AT]civicrm[DOT]org. If you have questions about the |
24 | GNU Affero General Public License or the licensing of CiviCRM, |
25 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
26 +--------------------------------------------------------------------+
30 * Class representing the table relationships
33 * @copyright CiviCRM LLC (c) 2004-2013
37 class CRM_Core_TableHierarchy
{
40 * This array defines weights for table, which are used to sort array of table in from clause
45 'civicrm_contact' => '01',
46 'civicrm_address' => '09',
47 'civicrm_county' => '10',
48 'civicrm_state_province' => '11',
49 'civicrm_country' => '12',
50 'civicrm_email' => '13',
51 'civicrm_phone' => '14',
53 'civicrm_openid' => '17',
54 'civicrm_location_type' => '18',
55 'civicrm_group_contact' => '19',
56 'civicrm_group' => '20',
57 'civicrm_subscription_history' => '21',
58 'civicrm_entity_tag' => '22',
59 'civicrm_note' => '23',
60 'civicrm_contribution' => '24',
61 'civicrm_financial_type' => '25',
62 'civicrm_participant' => '26',
63 'civicrm_event' => '27',
64 'civicrm_worldregion' => '28',
65 'civicrm_case_contact' => '29',
66 'civicrm_case' => '30',
67 'case_relationship' => '31',
68 'case_relation_type' => '32',
69 'civicrm_activity' => '33',
70 'civicrm_mailing_summary' => '34',
71 'civicrm_mailing_recipients' => '35',
72 'civicrm_mailing' => '36',
73 'civicrm_mailing_job' => '37',
74 'civicrm_mailing_event_queue' => '38',
75 'civicrm_mailing_event_bounce' => '39',
76 'civicrm_mailing_event_opened' => '40',
77 'civicrm_mailing_event_reply' => '41',
78 'civicrm_mailing_event_trackable_url_open' => '42',
81 static function &info() {
82 //get the campaign related tables.
83 CRM_Campaign_BAO_Query
::info(self
::$info);