Revision 04c85293
Von Sven Schöling vor fast 18 Jahren hinzugefügt
SL/DBUtils.pm | ||
---|---|---|
3 | 3 |
require Exporter; |
4 | 4 |
@ISA = qw(Exporter); |
5 | 5 |
|
6 |
@EXPORT = qw(conv_i conv_date conv_dateq do_query selectrow_query do_statement dump_query); |
|
6 |
@EXPORT = qw(conv_i conv_date conv_dateq do_query selectrow_query do_statement dump_query quote_db_date);
|
|
7 | 7 |
|
8 | 8 |
sub conv_i { |
9 | 9 |
my ($value, $default) = @_; |
... | ... | |
74 | 74 |
$main::lxdebug->message($level, $msg . $query); |
75 | 75 |
} |
76 | 76 |
|
77 |
sub quote_db_date { |
|
78 |
my ($str) = @_; |
|
79 |
return "NULL" unless defined $str; |
|
80 |
return "current_date" if $str =~ /current_date/; |
|
81 |
$str =~ s/'/''/g; |
|
82 |
return "'$str'"; |
|
83 |
} |
|
84 |
|
|
77 | 85 |
1; |
SL/Form.pm | ||
---|---|---|
239 | 239 |
return $str; |
240 | 240 |
} |
241 | 241 |
|
242 |
sub quote_db_date { |
|
243 |
$main::lxdebug->enter_sub(2) and my ($self, $str) = @_; |
|
244 |
$main::lxdebug->leave_sub(2) and return "NULL" unless defined $str; |
|
245 |
$main::lxdebug->leave_sub(2) and return "current_date" if $str =~ /current_date/; |
|
246 |
$str =~ s/'/''/g; |
|
247 |
$main::lxdebug->leave_sub(2) and return "'$str'"; |
|
248 |
} |
|
249 |
|
|
250 |
|
|
251 | 242 |
sub hide_form { |
252 | 243 |
my $self = shift; |
253 | 244 |
|
Auch abrufbar als: Unified diff
quote_db_date verschoben nach DBUtils