gaspower Posted June 15, 2007 Posted June 15, 2007 Hello, Can someone help me understand the errors and may be where to correct the problem. I installed discount coupons and get these two errors. admin/modules/order total 1171 - All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead CREATE TABLE IF NOT EXISTS discount_coupons_to_orders ( coupons_id VARCHAR(32) NOT NULL DEFAULT '', orders_id INT(11) DEFAULT '0', PRIMARY KEY (coupons_id,orders_id) ) catalog/checkout_shipping, 1146 - Table 'rcbulkbearings.discount_coupons_to_categories' doesn't exist SELECT categories_id FROM discount_coupons_to_categories WHERE coupons_id="" Thanks JR
Jan Zonjee Posted June 16, 2007 Posted June 16, 2007 Can someone help me understand the errors and may be where to correct the problem. I installed discount coupons and get these two errors. admin/modules/order total 1171 - All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead CREATE TABLE IF NOT EXISTS discount_coupons_to_orders ( coupons_id VARCHAR(32) NOT NULL DEFAULT '', orders_id INT(11) DEFAULT '0', PRIMARY KEY (coupons_id,orders_id) ) MySQL does maintain a reference manual.... The error seems clear. I personally would try: CREATE TABLE IF NOT EXISTS discount_coupons_to_orders ( coupons_id VARCHAR(32) NOT NULL DEFAULT '', orders_id INT(11) DEFAULT '0', UNIQUE (coupons_id,orders_id) ); catalog/checkout_shipping, 1146 - Table 'rcbulkbearings.discount_coupons_to_categories' doesn't exist SELECT categories_id FROM discount_coupons_to_categories WHERE coupons_id="" Either the table doesn't exist or the define for it is missing in catalog/includes/database_tables.php.
gaspower Posted June 16, 2007 Author Posted June 16, 2007 Hello, Thank you for the reply, but in the installation I did not see where it had me create a discount_coupons_to_categories? My install instructions just shows discount_coupons and discount_coupons_to_orders. Also another problem I seem to have is in the admin/modules/roder totals, when I click the install button, nothing happens? In the database_tables, this is what I have currently, //kgt - discount coupons define('ENTRY_DISCOUNT_COUPON_ERROR', 'The coupon code you have entered is not valid.'); define('ENTRY_DISCOUNT_COUPON_AVAILABLE_ERROR', 'The coupon code you have entered is no longer valid.'); define('ENTRY_DISCOUNT_COUPON_USE_ERROR', 'Our records show that you have used this coupon %s time(s). You may not use this code more than %s time(s).'); define('ENTRY_DISCOUNT_COUPON_MIN_ERROR', 'The minimum order total for this coupon is %s'); define('ENTRY_DISCOUNT_COUPON', 'Coupon Code:'); define('ENTRY_DISCOUNT_COUPON_FREE_SHIPPING_ERROR', 'Your order total is now below the free shipping minimum.'); //end kgt - discount coupons Thanks JR
♥Vger Posted June 16, 2007 Posted June 16, 2007 Those aren't database tables, they are TEXT DEFINES Vger
gaspower Posted June 17, 2007 Author Posted June 17, 2007 Hello, Thank you for the reply. I am using the following statement to create the table, CREATE TABLE IF NOT EXISTS discount_coupons_to_orders ( coupons_id VARCHAR(32) NOT NULL DEFAULT '', orders_id INT(11) DEFAULT '0', UNIQUE (coupons_id,orders_id) ); but, when I push the install button unders modules/order total I get this error, 1171 - All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead CREATE TABLE IF NOT EXISTS discount_coupons_to_orders ( coupons_id VARCHAR(32) NOT NULL DEFAULT '', orders_id INT(11) DEFAULT '0', PRIMARY KEY (coupons_id,orders_id) ). I just do not understand where to fix the problem? Thanks JR
Recommended Posts
Archived
This topic is now archived and is closed to further replies.