version 1.16, 2003/12/26 19:12:51
|
version 1.18, 2003/12/27 16:58:36
|
Line 559 sub update_table_info {
|
Line 559 sub update_table_info {
|
$debugstring = "Retrieved table info for $tablename"; |
$debugstring = "Retrieved table info for $tablename"; |
return 1; |
return 1; |
} |
} |
|
############################### |
|
|
|
=pod |
|
|
|
=item &col_order() |
|
|
|
Inputs: table id |
|
|
|
Returns: array with column order |
|
|
|
=cut |
|
|
|
|
|
sub col_order { |
|
my $table_id=shift; |
|
if (&update_table_info($table_id)) { |
|
return @{$Tables{$table_id}->{'Col_order'}}; |
|
} else { |
|
return (); |
|
} |
|
} |
############################### |
############################### |
|
|
=pod |
=pod |
Line 1002 sub remove_from_table {
|
Line 1022 sub remove_from_table {
|
return undef if (!defined(&connect_to_db())); |
return undef if (!defined(&connect_to_db())); |
# |
# |
$table_id = &translate_id($table_id); |
$table_id = &translate_id($table_id); |
my $command = 'DELETE FROM '.$table_id.' WHERE '.$dbh->quote($column). |
my $command = 'DELETE FROM '.$table_id.' WHERE '.$column. |
" LIKE BINARY ".$dbh->quote($value); |
" LIKE BINARY ".$dbh->quote($value); |
my $sth = $dbh->prepare($command); |
my $sth = $dbh->prepare($command); |
$sth->execute(); |
unless ($sth->execute()) { |
if ($sth->err) { |
|
$errorstring = "ERROR on execution of ".$command."\n".$sth->errstr; |
$errorstring = "ERROR on execution of ".$command."\n".$sth->errstr; |
return undef; |
return undef; |
} |
} |