[Vtigercrm-commits] [vtiger-commits] r7138 - /vtigercrm/trunk/include/utils/CommonUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Jun 15 11:15:10 EDT 2006


Author: saraj
Date: Thu Jun 15 09:15:06 2006
New Revision: 7138

Log:
getCampaignName function included

Modified:
    vtigercrm/trunk/include/utils/CommonUtils.php

Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Thu Jun 15 09:15:06 2006
@@ -410,6 +410,27 @@
 	$log->debug("Exiting getContactName method ...");
         return $contact_name;
 }
+
+/**
+ * Function to get the Campaign Name when a campaign id is given
+ * Takes the input as $campaign_id - campaign id
+ * returns the Campaign Name in string format.
+ */
+
+function getCampaignName($campaign_id)
+{
+	global $log;
+	$log->debug("Entering getCampaignName(".$campaign_id.") method ...");
+	$log->info("in getCampaignName ".$campaign_id);
+
+	global $adb;
+	$sql = "select * from vtiger_campaign where campaignid=".$campaign_id;
+	$result = $adb->query($sql);
+	$campaign_name = $adb->query_result($result,0,"campaignname");
+	$log->debug("Exiting getCampaignName method ...");
+	return $campaign_name;
+}
+
 
 /**
  * Function to get the Vendor Name when a vtiger_vendor id is given 





More information about the vtigercrm-commits mailing list