[Vtigercrm-commits] [vtiger-commits] r4710 - /vtigercrm/trunk/modules/Contacts/Contact.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 29 10:33:20 EST 2006
Author: don
Date: Wed Mar 29 08:33:16 2006
New Revision: 4710
Log:
code duplication removed
Modified:
vtigercrm/trunk/modules/Contacts/Contact.php
Modified: vtigercrm/trunk/modules/Contacts/Contact.php
==============================================================================
--- vtigercrm/trunk/modules/Contacts/Contact.php (original)
+++ vtigercrm/trunk/modules/Contacts/Contact.php Wed Mar 29 08:33:16 2006
@@ -424,44 +424,13 @@
-//method added to construct the query to fetch the custom fields
- function constructCustomQueryAddendum()
- {
-
- global $log;
- global $adb;
- //get all the custom fields created
- $sql1 = "select columnname,fieldlabel from field where generatedtype=2 and tabid=4";
- $result = $adb->query($sql1);
- $numRows = $adb->num_rows($result);
- $sql3 = "select ";
- for($i=0; $i < $numRows;$i++)
- {
- $columnName = $adb->query_result($result,$i,"columnname");
- $fieldlable = $adb->query_result($result,$i,"fieldlabel");
- //construct query as below
- if($i == 0)
- {
- $sql3 .= "contactscf.".$columnName. " '" .$fieldlable."'";
- }
- else
- {
- $sql3 .= ", contactscf.".$columnName. " '" .$fieldlable."'";
- }
-
- }
- $log->info("Custom Query successfully Constructed in constructCustomQueryAddendum()");
- return $sql3;
- }
-
-
function create_export_query(&$order_by, &$where)
{
global $log;
if($this->checkIfCustomTableExists('contactscf'))
{
- $query = $this->constructCustomQueryAddendum() .",
+ $query = $this->constructCustomQueryAddendum('contactscf','Contacts') .",
contactdetails.*, contactaddress.*,
account.accountname account_name,
users.user_name assigned_user_name
More information about the vtigercrm-commits
mailing list