jond Posted January 3, 2005 Share Posted January 3, 2005 Hi, Im installing the Discount Groups mod. This is the SQL i need, as per the instructions: # Database: catalog # Table: 'customers_groups' # CREATE TABLE `customers_groups` ( `customers_groups_id` int(11) NOT NULL auto_increment, `customers_groups_name` varchar(32) NOT NULL default '', `customers_groups_discount` int(11) NOT NULL default '0', PRIMARY KEY (`customers_groups_id`) ) TYPE=MyISAM; # Database: catalog # Table: 'groups_to_categories' # CREATE TABLE `groups_to_categories` ( `customers_groups_id` int(11) NOT NULL default '0', `categories_id` int(11) NOT NULL default '0', `discount` int(11) NOT NULL default '0', PRIMARY KEY (`customers_groups_id`,`categories_id`) ) TYPE=MyISAM; F add to the "customers_groups" table a record with id "1", name "Default" and discount = 0 add the column "customers_groups_id" int(11) to "customers" table with default value = 1; execute on table "customers": UPDATE customers SET customers_groups_id = 1; add the column "category_id" int(11) to "customers_basket" table ; ---------------------------------------------- Could someone translate this into pure SQL for me? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
petercwik Posted January 11, 2005 Share Posted January 11, 2005 add to the "customers_groups" table a record with id "1", name "Default" and discount = 0 add the column "customers_groups_id" int(11) to "customers" table with default value = 1; execute on table "customers": UPDATE customers SET customers_groups_id = 1; add the column "category_id" int(11) to "customers_basket" table ; ---------------------------------------------- Could someone translate this into pure SQL for me? Thanks in advance! <{POST_SNAPBACK}> Insert into customers_groups (id,name,discount) values ('1','Default',0); Alter table customers_groups_id add 'customers_groups_id' int(11) with default = 1; Update customers set customers_groups_id = 1; Alter table 'customers_basket' add 'category_id int(11); This is standard SQL, not sure where the quotes go, or if they should be single or double quotes. But this should get you closer. :thumbsup: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.