From 3e47937f506d5c8c61f2092d1f43ae13a2958447 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Tue, 29 Apr 2008 15:40:01 +0000 Subject: [PATCH] bugfix gosaTriggered.pm: select max id from table git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10731 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/server/events/gosaTriggered.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index a796deef9..bb49c9b3e 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -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]); -- 2.30.2