summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index eec7d7f71..d89d581fd 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3483,7 +3483,7 @@ static int last_message_index(struct ast_vm_user *vmu, char *dir)
struct odbc_obj *obj;
obj = ast_odbc_request_obj(odbc_database, 0);
if (obj) {
- snprintf(sql, sizeof(sql), "SELECT msgnum FROM %s WHERE dir=? order by msgnum desc limit 1", odbc_table);
+ snprintf(sql, sizeof(sql), "SELECT msgnum FROM %s WHERE dir=? order by msgnum desc", odbc_table);
stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
if (!stmt) {