summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f9d2ad4)
raw | patch | inline | side by side (parent: f9d2ad4)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 22 Jan 2008 09:42:54 +0000 (09:42 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 22 Jan 2008 09:42:54 +0000 (09:42 +0000) |
now more than 10 jobs are possible...
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8532 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8532 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/DBsqlite.pm | patch | blob | history |
index 20463d7827632a4700b0e8b78fb51b3d268a488c..5eede46f60b747d94e8b85bced02c83f6fe901e6 100644 (file)
use Data::Dumper;
use threads;
use Time::HiRes qw(usleep);
+use POE qw(Component::EasyDBI);
my $col_names = {};
# if primkey is id, fetch max id from table and give new job id= max(id)+1
if ($primkey eq 'id') {
my $id;
- my $sql_statement = "SELECT MAX(id) FROM $table";
+ my $sql_statement = "SELECT MAX(CAST(id AS INTEGER)) FROM $table";
&create_lock($self,'add_dbentry');
my $max_id = @{ @{ $self->{dbh}->selectall_arrayref($sql_statement) }[0] }[0];
&remove_lock($self,'add_dbentry');