version 1.11, 2001/10/14 17:48:12
|
version 1.16, 2004/08/28 23:47:41
|
Line 37 sub CheckTable
|
Line 37 sub CheckTable
|
my ($TabName) = @_; |
my ($TabName) = @_; |
my ($ans); |
my ($ans); |
|
|
if (scalar(grep(/^$TabName$/, @tbl_list))) { |
if (scalar(grep(/^$TabName$/i, @tbl_list))) { |
print "Table $TabName exists. Do you want to delete it? "; |
print "Table $TabName exists. Do you want to delete it? "; |
$ans = <STDIN>; |
$ans = <STDIN>; |
if ($ans =~ /[yY]/) { |
if ($ans =~ /[yY]/) { |
Line 67 print "Connected successfully\n";
|
Line 67 print "Connected successfully\n";
|
KEY ParentIdKey (ParentId), |
KEY ParentIdKey (ParentId), |
Number SMALLINT UNSIGNED NOT NULL, |
Number SMALLINT UNSIGNED NOT NULL, |
KEY NumberKey (Number), |
KEY NumberKey (Number), |
Type TEXT NOT NULL, |
Type CHAR(5) NOT NULL DEFAULT 'þ', |
|
KEY TypeKey (Type), |
Question TEXT, |
Question TEXT, |
Answer TEXT, |
Answer TEXT, |
|
PassCriteria TEXT, |
Authors TEXT, |
Authors TEXT, |
Sources TEXT, |
Sources TEXT, |
Comments TEXT, |
Comments TEXT, |
Rating TEXT, |
Rating TEXT, |
|
Topic TEXT, |
ProcessedBySearch INT |
ProcessedBySearch INT |
)") |
)") |
or die "Can't create Questions table: $!\n"; |
or die "Can't create Questions table: $!\n"; |