Skip to content

Commit

Permalink
TWEAK: Changed data types for short text/comments/other from varchar(…
Browse files Browse the repository at this point in the history
…200) or varchar(255) to tinytext. This increases the maximum rowsize possible when activating a survey with a lot of questions.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@1173 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Sep 12, 2004
1 parent 8fcaef8 commit 66f065e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions admin/activate.php
Expand Up @@ -224,7 +224,7 @@
$createsurvey .= " TINYTEXT";
break;
case "S": //SHORT TEXT
$createsurvey .= " VARCHAR(200)";
$createsurvey .= " TINYTEXT";
break;
case "L": //LIST (RADIO)
case "!": //LIST (DROPDOWN)
Expand Down Expand Up @@ -265,15 +265,15 @@
if ($abrow['other']=="Y") {$alsoother="Y";}
if ($arow['type'] == "P")
{
$createsurvey .= " `{$arow['sid']}X{$arow['gid']}X{$arow['qid']}{$abrow['code']}comment` VARCHAR(255),\n";
$createsurvey .= " `{$arow['sid']}X{$arow['gid']}X{$arow['qid']}{$abrow['code']}comment` TINYTEXT,\n";
}
}
if ((isset($alsoother) && $alsoother=="Y") && ($arow['type']=="M" || $arow['type']=="P"))
{
$createsurvey .= " `{$arow['sid']}X{$arow['gid']}X{$arow['qid']}other` VARCHAR(255),\n";
$createsurvey .= " `{$arow['sid']}X{$arow['gid']}X{$arow['qid']}other` TINYTEXT,\n";
if ($arow['type']=="P")
{
$createsurvey .= " `{$arow['sid']}X{$arow['gid']}X{$arow['qid']}othercomment` VARCHAR(255),\n";
$createsurvey .= " `{$arow['sid']}X{$arow['gid']}X{$arow['qid']}othercomment` TINYTEXT,\n";
}
}
}
Expand All @@ -283,7 +283,7 @@
$abresult=mysql_query($abquery) or die ("Couldn't get perform answers query<br />$abquery<br />".mysql_error());
while ($abrow=mysql_fetch_array($abresult))
{
$createsurvey .= " `{$arow['sid']}X{$arow['gid']}X{$arow['qid']}{$abrow['code']}` VARCHAR(255),\n";
$createsurvey .= " `{$arow['sid']}X{$arow['gid']}X{$arow['qid']}{$abrow['code']}` TINYTEXT,\n";
}
}
elseif ($arow['type'] == "R")
Expand Down

0 comments on commit 66f065e

Please sign in to comment.