[Vtigercrm-commits] [vtiger-commits] r4214 - /vtigercrm/trunk/install/5createTables.inc.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 15 10:44:41 EST 2006


Author: richie
Date: Wed Mar 15 08:44:37 2006
New Revision: 4214

Log:
query fixed for insert with addition of quotes

Modified:
    vtigercrm/trunk/install/5createTables.inc.php

Modified: vtigercrm/trunk/install/5createTables.inc.php
==============================================================================
--- vtigercrm/trunk/install/5createTables.inc.php (original)
+++ vtigercrm/trunk/install/5createTables.inc.php Wed Mar 15 08:44:37 2006
@@ -195,7 +195,7 @@
 	$role_result = $db->query($role_query);
 	$role_id = $db->query_result($role_result,0,"roleid");
 
-	$sql_stmt1 = "insert into user2role values(".$user->id.",".$role_id.")";
+	$sql_stmt1 = "insert into user2role values(".$user->id.",'".$role_id."')";
 	$db->query($sql_stmt1) or die($app_strings['ERR_CREATING_TABLE'].mysql_error());
 }
 
@@ -229,8 +229,8 @@
 // TODO HTML
 if($success==0)
 	die("Error: Tables not created.  Table creation failed.\n");
-elseif ($success==1)
-	die("Error: Tables partially created.  Table creation failed.\n");
+//elseif ($success==1)
+//	die("Error: Tables partially created.  Table creation failed.\n");
 else
 	eecho("Tables Successfully created.\n");
 
@@ -290,7 +290,7 @@
 $role_result = $db->query($role_query);
 $role_id = $db->query_result($role_result,0,"roleid");
 
-$sql_stmt2 = "insert into user2role values(".$uid.",".$role_id.")";
+$sql_stmt2 = "insert into user2role values(".$uid.",'".$role_id."')";
 $db->query($sql_stmt2) or die($app_strings['ERR_CREATING_TABLE'].mysql_error());
 
 // create and populate combo tables





More information about the vtigercrm-commits mailing list