version 1.13, 2003/04/18 15:50:55
|
version 1.14, 2003/06/02 16:44:01
|
Line 1013 sub remove_from_table {
|
Line 1013 sub remove_from_table {
|
return $rows; |
return $rows; |
} |
} |
|
|
|
########################################### |
|
|
|
=pod |
|
|
|
=item drop_table($table_id) |
|
|
|
Issues a 'drop table if exists' command |
|
|
|
=cut |
|
|
|
########################################### |
|
|
|
sub drop_table { |
|
my ($table_id) = @_; |
|
return undef if (!defined(&connect_to_db())); |
|
# |
|
$table_id = &translate_id($table_id); |
|
my $command = 'DROP TABLE IF EXISTS '.$table_id; |
|
my $sth = $dbh->prepare($command); |
|
$sth->execute(); |
|
if ($sth->err) { |
|
$errorstring = "ERROR on execution of ".$command."\n".$sth->errstr; |
|
return undef; |
|
} |
|
$debugstring = $command; |
|
return 1; # if we got here there was no error, so return a 'true' value |
|
} |
|
|
1; |
1; |
|
|