Code

bugfix gosaTriggered.pm: select max id from table
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Apr 2008 15:40:01 +0000 (15:40 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 Apr 2008 15:40:01 +0000 (15:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10731 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/server/events/gosaTriggered.pm

index a796deef963a51d6d1e225dce5672ad87910a36a..bb49c9b3ec0cfa2d1ecacb682a7128a87ce1b427 100644 (file)
@@ -98,7 +98,7 @@ sub send_user_msg {
 
     # add incoming message to messaging_db
     my $new_msg_id = 1;
-    my $new_msg_id_sql = "SELECT MAX(id) FROM $main::messaging_tn"; 
+       my $new_msg_id_sql = "SELECT MAX(CAST(id AS INTEGER)) FROM $main::messaging_tn";
     my $new_msg_id_res = $main::messaging_db->exec_statement($new_msg_id_sql);
     if (defined @{@{$new_msg_id_res}[0]}[0] ) {
         $new_msg_id = int(@{@{$new_msg_id_res}[0]}[0]);