From 3c47c5763ad624ac525cd8d2c19b08b61a55fcda Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 20 May 2016 00:13:11 +0300 Subject: fix query --- src/main/java/com/juick/api/TelegramBotHook.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/juick/api') diff --git a/src/main/java/com/juick/api/TelegramBotHook.java b/src/main/java/com/juick/api/TelegramBotHook.java index 48e6bccb..fa05c2f0 100644 --- a/src/main/java/com/juick/api/TelegramBotHook.java +++ b/src/main/java/com/juick/api/TelegramBotHook.java @@ -194,7 +194,7 @@ public class TelegramBotHook { } private int getUser(long tgId) { try { - return jdbc.queryForObject("SELECT id, nick, banned FROM users INNER JOIN telegram " + + return jdbc.queryForObject("SELECT id FROM users INNER JOIN telegram " + "ON telegram.user_id = users.id WHERE telegram.tg_id=?", Integer.class, tgId); } catch (EmptyResultDataAccessException e) { return 0; -- cgit v1.2.3