Skip to content

Commit

Permalink
Split new "saved" table into two - "saved_control" which holds "one-o…
Browse files Browse the repository at this point in the history
…ff" information such as sid, status, etc and "saved" which contains minimal data for each answer. See http://phpsurveyor.org/phpwiki/ recent changes for general summary of principles of these tables

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@1181 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Sep 14, 2004
1 parent 24f419e commit 9db726e
Show file tree
Hide file tree
Showing 5 changed files with 390 additions and 312 deletions.
23 changes: 15 additions & 8 deletions admin/checkfields.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"{$dbprefix}users",
"{$dbprefix}labelsets",
"{$dbprefix}labels",
"{$dbprefix}saved");
"{$dbprefix}saved",
"{$dbprefix}saved_control");

//KEYS
$keyinfo[]=array("{$dbprefix}surveys", "sid");
Expand All @@ -56,6 +57,7 @@
$keyinfo[]=array("{$dbprefix}conditions", "cid");
$keyinfo[]=array("{$dbprefix}labelsets", "lid");
$keyinfo[]=array("{$dbprefix}saved", "saved_id");
$keyinfo[]=array("{$dbprefix}saved_control", "scid");

//FIELDS THAT SHOULD EXIST
$allfields[]=array("{$dbprefix}labelsets", "lid", "lid int(11) NOT NULL auto_increment");
Expand Down Expand Up @@ -128,15 +130,20 @@
$allfields[]=array("{$dbprefix}surveys", "allowsave","allowsave char(1) default 'Y'");

$allfields[]=array("{$dbprefix}saved", "saved_id", "saved_id int(11) NOT NULL auto_increment");
$allfields[]=array("{$dbprefix}saved", "sid", "sid int(11) NOT NULL default '0'");
$allfields[]=array("{$dbprefix}saved", "saved_thisstep", "saved_thisstep text NOT NULL");
$allfields[]=array("{$dbprefix}saved", "saved_ip", "saved_ip text NOT NULL");
$allfields[]=array("{$dbprefix}saved", "saved_date", "saved_date datetime NOT NULL default '0000-00-00 00:00:00'");
$allfields[]=array("{$dbprefix}saved", "identifier", "identifier text NOT NULL");
$allfields[]=array("{$dbprefix}saved", "access_code", "access_code text NOT NULL");
$allfields[]=array("{$dbprefix}saved", "scid", "scid int(11) NOT NULL");
$allfields[]=array("{$dbprefix}saved", "datestamp", "datestamp datetime NOT NULL default '0000-00-00 00:00:00'");
$allfields[]=array("{$dbprefix}saved", "fieldname", "fieldname text NOT NULL");
$allfields[]=array("{$dbprefix}saved", "value", "value text NOT NULL");
$allfields[]=array("{$dbprefix}saved", "email", "email varchar(200)");

$allfields[]=array("{$dbprefix}saved_control", "scid", "scid int(11) NOT NULL auto_increment");
$allfields[]=array("{$dbprefix}saved_control", "sid", "sid int(11) NOT NULL default '0'");
$allfields[]=array("{$dbprefix}saved_control", "identifier", "identifier text NOT NULL");
$allfields[]=array("{$dbprefix}saved_control", "access_code", "access_code text NOT NULL");
$allfields[]=array("{$dbprefix}saved_control", "email", "email varchar(200)");
$allfields[]=array("{$dbprefix}saved_control", "ip", "ip text NOT NULL");
$allfields[]=array("{$dbprefix}saved_control", "saved_thisstep", "saved_thisstep text NOT NULL");
$allfields[]=array("{$dbprefix}saved_control", "status", "status char(1) NOT NULL");
$allfields[]=array("{$dbprefix}saved_control", "saved_date", "saved_date datetime NOT NULL default '0000-00-00 00:00:00'");

echo $htmlheader;

Expand Down
Loading

0 comments on commit 9db726e

Please sign in to comment.