[Vtigercrm-commits] [vtiger-commits] r4439 - in /vtigercrm/branches/4.2_postgresql_integration/modules: Import/UsersLastImport.php Leads/Lead.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 27 02:18:12 EST 2006


Author: allanbush
Date: Mon Mar 27 00:18:08 2006
New Revision: 4439

Log:
Proper aliasing for some import and export queries.  Ref #17.

Modified:
    vtigercrm/branches/4.2_postgresql_integration/modules/Import/UsersLastImport.php
    vtigercrm/branches/4.2_postgresql_integration/modules/Leads/Lead.php

Modified: vtigercrm/branches/4.2_postgresql_integration/modules/Import/UsersLastImport.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/modules/Import/UsersLastImport.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/modules/Import/UsersLastImport.php Mon Mar 27 00:18:08 2006
@@ -173,7 +173,7 @@
 				AND accounts.deleted=0
 				AND users.status='ACTIVE'";*/
 				$query = "SELECT distinct account.*, accountbillads.city,
-                                users.user_name assigned_user_name,
+                                users.user_name AS assigned_user_name,
 				crmid, smownerid 
 				FROM account
 				inner join crmentity on crmentity.crmid=account.accountid
@@ -215,9 +215,9 @@
 				AND users.status='ACTIVE'";*/
 
 			$query = "SELECT distinct
-                                account.accountid account_id,
-                                account.accountname account_name,
-                                users.user_name assigned_user_name,
+                                account.accountid AS account_id,
+                                account.accountname AS account_name,
+                                users.user_name AS assigned_user_name,
 				crmentity.crmid, smownerid,
 				potential.*
                                FROM potential 
@@ -236,7 +236,7 @@
 		else if($this->bean_type == 'Leads')
 		{
 			$query = "SELECT distinct leaddetails.*, crmentity.crmid, leadaddress.phone,leadsubdetails.website,
-                                users.user_name assigned_user_name,
+                                users.user_name AS assigned_user_name,
 				smownerid 
 				FROM leaddetails 
 				inner join crmentity on crmentity.crmid=leaddetails.leadid 

Modified: vtigercrm/branches/4.2_postgresql_integration/modules/Leads/Lead.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/modules/Leads/Lead.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/modules/Leads/Lead.php Mon Mar 27 00:18:08 2006
@@ -211,7 +211,7 @@
 		{
           
   $query = $this->constructCustomQueryAddendum() . ", 
-			leaddetails.*, ".$this->entity_table.".*, leadsubdetails.*,leadaddress.city city, leadaddress.state state,leadaddress.code code,leadaddress.country country, leadaddress.phone phone, users.user_name, users.status user_status
+			leaddetails.*, ".$this->entity_table.".*, leadsubdetails.*,leadaddress.city AS city, leadaddress.state AS state,leadaddress.code AS code,leadaddress.country AS country, leadaddress.phone AS phone, users.user_name, users.status AS user_status
                         FROM ".$this->entity_table."
                         INNER JOIN leaddetails
                         ON crmentity.crmid=leaddetails.leadid
@@ -228,7 +228,7 @@
 		else
 		{
                   $query = "SELECT 
-			leaddetails.*, ".$this->entity_table.".*, leadsubdetails.*,leadaddress.*,users.user_name, users.status user_status FROM ".$this->entity_table."
+			leaddetails.*, ".$this->entity_table.".*, leadsubdetails.*,leadaddress.*,users.user_name, users.status AS user_status FROM ".$this->entity_table."
                         INNER JOIN leaddetails
                         ON crmentity.crmid=leaddetails.leadid
                         LEFT JOIN leadsubdetails





More information about the vtigercrm-commits mailing list