Difference between revisions of "VbzCart/tables/var global"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(New page: ==About== * '''Status''': not currently being used, but is probably needed for proper stats display in controlbar * '''Purpose''':computed variables, cache timestamps, and other variable s...)
 
(structural changes, documentation)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
==About==
 
==About==
 
* '''Status''': not currently being used, but is probably needed for proper stats display in controlbar
 
* '''Status''': not currently being used, but is probably needed for proper stats display in controlbar
* '''Purpose''':computed variables, cache timestamps, and other variable stuff
+
* '''Purpose''': any simple data which needs to be both persistent and easily updateable by the code
 +
** currently needed for tracking the current order number
 +
** later, may be used for storing calculated statistics for the sidebar
 +
* '''History''':
 +
** '''2009-09-27''' renamed from "stats" to "var_global" to reflect new purpose
 +
*** '''Name''' length increased from 32 to 255 to make it easier to indicate hierarchy, if needed
 +
*** Added '''When*''' fields, mainly as a sort of debug/reality check
 
==SQL==
 
==SQL==
<section begin=sql /><mysql> CREATE TABLE `stats` (
+
<section begin=sql /><mysql> CREATE TABLE `var_global` (
     `Name` varchar(32) NOT NULL COMMENT 'name of variable',
+
     `Name`   VARCHAR(255)     NOT NULL COMMENT "name of variable",
     `Value` varchar(255) COMMENT 'value of variable',
+
     `Value`   VARCHAR(255) DEFAULT NULL COMMENT "value of variable",
 +
    `WhenCreated` DATETIME    NOT NULL COMMENT "when variable was first created",
 +
    `WhenUpdated` DATETIME DEFAULT NULL COMMENT "when variable's value was changed",
 
   PRIMARY KEY(`Name`)
 
   PRIMARY KEY(`Name`)
 
  ) ENGINE = MYISAM;</mysql>
 
  ) ENGINE = MYISAM;</mysql>
 
<section end=sql />
 
<section end=sql />

Latest revision as of 15:34, 27 September 2009

About

  • Status: not currently being used, but is probably needed for proper stats display in controlbar
  • Purpose: any simple data which needs to be both persistent and easily updateable by the code
    • currently needed for tracking the current order number
    • later, may be used for storing calculated statistics for the sidebar
  • History:
    • 2009-09-27 renamed from "stats" to "var_global" to reflect new purpose
      • Name length increased from 32 to 255 to make it easier to indicate hierarchy, if needed
      • Added When* fields, mainly as a sort of debug/reality check

SQL

<mysql> CREATE TABLE `var_global` (

   `Name`    VARCHAR(255)     NOT NULL COMMENT "name of variable",
   `Value`   VARCHAR(255) DEFAULT NULL COMMENT "value of variable",
   `WhenCreated` DATETIME     NOT NULL COMMENT "when variable was first created",
   `WhenUpdated` DATETIME DEFAULT NULL COMMENT "when variable's value was changed",
  PRIMARY KEY(`Name`)
) ENGINE = MYISAM;</mysql>