2 |
## $Id$ |
## $Id$ |
3 |
## -------------------------------------------------------------------------------- |
## -------------------------------------------------------------------------------- |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.5 2002/11/17 07:18:38 joko |
6 |
|
## + small modification in hash2sql |
7 |
|
## |
8 |
## Revision 1.4 2002/10/16 22:36:42 joko |
## Revision 1.4 2002/10/16 22:36:42 joko |
9 |
## + sub testDbServer |
## + sub testDbServer |
10 |
## |
## |
80 |
my $crit = shift; |
my $crit = shift; |
81 |
|
|
82 |
my $sql; |
my $sql; |
83 |
if ($mode == SQL_INSERT || $mode eq 'SQL_INSERT') { |
if ($mode eq 'SQL_INSERT' || $mode == SQL_INSERT) { |
84 |
$sql = "INSERT INTO $table (#fields#) VALUES (#values#);"; |
$sql = "INSERT INTO $table (#fields#) VALUES (#values#);"; |
85 |
} |
} |
86 |
if ($mode == SQL_UPDATE || $mode eq 'SQL_UPDATE') { |
if ($mode eq 'SQL_UPDATE' || $mode == SQL_UPDATE) { |
87 |
$sql = "UPDATE $table SET #fields-values# WHERE $crit;"; |
$sql = "UPDATE $table SET #fields-values# WHERE $crit;"; |
88 |
} |
} |
89 |
|
|