[Vtigercrm-commits] [vtiger-commits] r7096 - /vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Jun 15 02:14:36 EDT 2006


Author: don
Date: Thu Jun 15 00:14:32 2006
New Revision: 7096

Log:
added vtiger_ prefix for table names

Modified:
    vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php

Modified: vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php
==============================================================================
--- vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php (original)
+++ vtigercrm/trunk/modules/Settings/AddCustomFieldToDB.php Thu Jun 15 00:14:32 2006
@@ -25,7 +25,7 @@
 
 //checking if the user is trying to create a custom vtiger_field which already exists  
 
-$checkquery="select * from vtiger_field where vtiger_tabid='".$tabid."'and vtiger_fieldlabel='".$fldlabel."'";
+$checkquery="select * from vtiger_field where tabid='".$tabid."'and fieldlabel='".$fldlabel."'";
 $checkresult=$adb->query($checkquery);
 
 if($adb->num_rows($checkresult) != 0)
@@ -256,7 +256,7 @@
 		}
 		else
 		{
-			$query = "update vtiger_field set vtiger_fieldlabel='".$fldlabel."',typeofdata='".$uichekdata."' where vtiger_fieldid=".$_REQUEST['fieldid'];
+			$query = "update vtiger_field set fieldlabel='".$fldlabel."',typeofdata='".$uichekdata."' where fieldid=".$_REQUEST['fieldid'];
 			$adb->query($query);
 		}
 		//Inserting values into vtiger_profile2field vtiger_tables
@@ -283,7 +283,7 @@
 			// Creating the PickList Table and Populating Values
 			$adb->createTable($columnName, $columnName." C(255)");
 			//Adding Primary Key
-			$qur = "ALTER vtiger_table ".$columnName." ADD PRIMARY KEY (". $columnName.")";
+			$qur = "ALTER table ".$columnName." ADD PRIMARY KEY (". $columnName.")";
 			$adb->query($qur);
 
 			$fldPickList =  $_REQUEST['fldPickList'];





More information about the vtigercrm-commits mailing list