Changeset 4396 for trunk/contactcenter/inc
- Timestamp:
- 05/12/11 16:51:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/contactcenter/inc/class.so_group.inc.php
r4107 r4396 141 141 { 142 142 $query = 'select' 143 . ' phpgw_cc_connections.id_connection,'144 . ' phpgw_cc_contact.id_contact,'145 . ' phpgw_cc_contact.names_ordered,'146 . ' phpgw_cc_contact.alias,'147 . ' phpgw_cc_contact.birthdate,'148 . ' phpgw_cc_contact.sex,'149 . ' phpgw_cc_contact.pgp_key,'150 . ' phpgw_cc_contact.notes,'151 . ' phpgw_cc_contact.web_page,'152 . ' phpgw_cc_contact.corporate_name,'153 . ' phpgw_cc_contact.job_title,'154 . ' phpgw_cc_contact.department,'155 . ' phpgw_cc_connections.connection_name,'156 . ' phpgw_cc_connections.connection_value,'157 . ' phpgw_cc_contact_conns.id_typeof_contact_connection,'143 . ' C.id_connection,' 144 . ' A.id_contact,' 145 . ' A.names_ordered,' 146 . ' A.alias,' 147 . ' A.birthdate,' 148 . ' A.sex,' 149 . ' A.pgp_key,' 150 . ' A.notes,' 151 . ' A.web_page,' 152 . ' A.corporate_name,' 153 . ' A.job_title,' 154 . ' A.department,' 155 . ' C.connection_name,' 156 . ' C.connection_value,' 157 . ' B.id_typeof_contact_connection,' 158 158 . ' phpgw_cc_contact_addrs.id_typeof_contact_address,' 159 159 . ' phpgw_cc_addresses.address1,' … … 167 167 168 168 $query .= ' from' 169 . ' phpgw_cc_contact '170 . ' inner join phpgw_cc_contact_conns on ( phpgw_cc_contact.id_contact = phpgw_cc_contact_conns.id_contact )'171 . ' inner join phpgw_cc_connections on ( phpgw_cc_contact_conns.id_connection = phpgw_cc_connections.id_connection )'172 . ' left join phpgw_cc_contact_addrs on ( phpgw_cc_contact.id_contact = phpgw_cc_contact_addrs.id_contact )'169 . ' phpgw_cc_contact A' 170 . ' inner join phpgw_cc_contact_conns B on ( A.id_contact = B.id_contact )' 171 . ' inner join phpgw_cc_connections C on ( B.id_connection = C.id_connection )' 172 . ' left join phpgw_cc_contact_addrs on ( A.id_contact = phpgw_cc_contact_addrs.id_contact )' 173 173 . ' left join phpgw_cc_addresses on ( phpgw_cc_contact_addrs.id_address = phpgw_cc_addresses.id_address )' 174 174 . ' left join phpgw_cc_city on ( phpgw_cc_addresses.id_city = phpgw_cc_city.id_city )' … … 177 177 178 178 $query .= ' where' 179 . " phpgw_cc_contact.id_owner = {$this->owner}"179 . " A.id_owner = {$this->owner}" 180 180 //. ' and phpgw_cc_connections.connection_is_default = true' 181 181 ; … … 196 196 197 197 if ( $field == 'only_email' ) 198 $query .= ' and phpgw_cc_contact_conns.id_typeof_contact_connection = 1 ';199 200 $query .= ' order by phpgw_cc_contact.names_ordered, phpgw_cc_connections.connection_value';198 $query .= ' and B.id_typeof_contact_connection = 1 '; 199 200 $query .= ' order by A.names_ordered, C.connection_value'; 201 201 202 202 if (!$this->db->query($query))
Note: See TracChangeset
for help on using the changeset viewer.