Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 32147d43

Von Moritz Bunkus vor fast 16 Jahren hinzugefügt

  • ID 32147d43441f0a99e6e320f6aaeb6b68e766264f
  • Vorgänger 14c1b704
  • Nachfolger c8c960bc

Eine neue Funktion zum Testen, ob eine Tabelle in der Datenbank existiert oder nicht.

Unterschiede anzeigen:

SL/DBUtils.pm
selectall_hashref_query selectall_array_query
selectall_as_map
prepare_execute_query prepare_query
create_sort_spec);
create_sort_spec does_table_exist);
sub conv_i {
my ($value, $default) = @_;
......
return %result;
}
sub does_table_exist {
$main::lxdebug->enter_sub(2);
my $dbh = shift;
my $table = shift;
my $result = 0;
if ($dbh) {
my $sth = $dbh->table_info('', '', $table, 'TABLE');
if ($sth) {
$result = $sth->fetchrow_hashref();
$sth->finish();
}
}
$main::lxdebug->leave_sub(2);
return $result;
}
1;

Auch abrufbar als: Unified diff