VbzCart/docs/tables/shop cart data: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | tables
Jump to navigation Jump to search
imported>Woozle
(removed "ID")
imported>Woozle
(relationship note; minor correction)
Line 1: Line 1:
==About==
==About==
* '''Purpose''': This is a simple table for retaining customer data entered at check-out time before converting the cart to an order.
* '''Purpose''': This is a simple table for retaining customer data entered at check-out time before converting the cart to an order.
* '''Relates to''': {{l/same|shop_cart}}
* '''History''':
* '''History''':
** '''2009-07-24''' renamed: shop_cust_data -> shop_cart_data; changed ID_Key -> Type
** '''2009-07-24''' renamed: shop_cust_data -> shop_cart_data; changed ID_Key -> Type
Line 7: Line 8:
<section begin=sql /><mysql>DROP TABLE IF EXISTS `shop_cart_data`;
<section begin=sql /><mysql>DROP TABLE IF EXISTS `shop_cart_data`;
CREATE TABLE `shop_cart_data` (
CREATE TABLE `shop_cart_data` (
   `ID_Cart`    INT NOT NULL COMMENT "shop_carts.ID",
   `ID_Cart`    INT NOT NULL COMMENT "shop_cart.ID",
   `Type`      INT NOT NULL COMMENT "data type - defined in code",
   `Type`      INT NOT NULL COMMENT "data type - defined in code",
   `Val`        VARCHAR(255) NOT NULL COMMENT "Value of data item",
   `Val`        VARCHAR(255) NOT NULL COMMENT "Value of data item",

Revision as of 20:28, 16 February 2013

About

  • Purpose: This is a simple table for retaining customer data entered at check-out time before converting the cart to an order.
  • Relates to: shop_cart
  • History:
    • 2009-07-24 renamed: shop_cust_data -> shop_cart_data; changed ID_Key -> Type
    • 2009-08-02 removed "ID" field; now using ID_Cart+Type as primary key

SQL

<section begin=sql /><mysql>DROP TABLE IF EXISTS `shop_cart_data`; CREATE TABLE `shop_cart_data` (

 `ID_Cart`    INT NOT NULL COMMENT "shop_cart.ID",
 `Type`       INT NOT NULL COMMENT "data type - defined in code",
 `Val`        VARCHAR(255) NOT NULL COMMENT "Value of data item",
 PRIMARY KEY(`ID_Cart`,`Type`)
) ENGINE = MYISAM;</mysql>

<section end=sql />