Difference between revisions of "VbzCart/archive/tables"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
|  (New page: ==updates== * '''Purpose''': timestamps on tables so we know when update queries need to be run * '''Status''': probably superceded by data flow tables and procs ===SQL=== <section begin=s...) |  (ctg_updates now discarded) | ||
| Line 1: | Line 1: | ||
| + | ==on other pages== | ||
| + | * {{vbzcart|table|ctg_updates}} | ||
| ==updates== | ==updates== | ||
| * '''Purpose''': timestamps on tables so we know when update queries need to be run | * '''Purpose''': timestamps on tables so we know when update queries need to be run | ||
Revision as of 23:50, 2 July 2009
on other pages
updates
- Purpose: timestamps on tables so we know when update queries need to be run
- Status: probably superceded by data flow tables and procs
SQL
<mysql> CREATE TABLE `updates` (
`Name` varchar(32) NOT NULL COMMENT 'name of thing which gets updated', `Updated` datetime COMMENT 'when last updated', PRIMARY KEY(`Name`) ) ENGINE = MYISAM;</mysql>
Function to record an update (not tested):
<mysql> CREATE PROCEDURE SetUpdate(IN iName varchar(32))
BEGIN REPLACE INTO updates(Name,Updated) values(iName, NOW()); END</mysql>