+sub selectall_ids {
+ $main::lxdebug->enter_sub(2);
+
+ my ($form, $dbh, $query, $key_col) = splice(@_, 0, 4);
+
+ my $sth = prepare_execute_query($form, $dbh, $query, @_);
+
+ my @ids;
+ while (my $ref = $sth->fetchrow_arrayref()) {
+ push @ids, $ref->[$key_col];
+ }
+
+ $sth->finish;
+
+ $main::lxdebug->leave_sub(2);
+
+ return @ids;
+}
+