diff options
Diffstat (limited to 'src/db.c')
-rw-r--r-- | src/db.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -53,7 +53,7 @@ static const char *stmt_sql[] = { [DB_STMT_SEL_ALL] = "SELECT " SEL_COLUMNS " FROM subscriber;", [DB_STMT_SEL_ALL_ORDER_LAST_SEEN] = "SELECT " SEL_COLUMNS " FROM subscriber " - "WHERE last_lu_seen IS NOT NULL ORDER BY last_lu_seen;", + "WHERE last_lu_seen IS NOT NULL AND last_lu_seen > datetime('now','-1 month') ORDER BY last_lu_seen;", [DB_STMT_SEL_FILTER_MSISDN] = "SELECT " SEL_COLUMNS " FROM subscriber WHERE msisdn LIKE $search ORDER BY msisdn", [DB_STMT_SEL_FILTER_IMSI] = "SELECT " SEL_COLUMNS " FROM subscriber WHERE imsi LIKE $search ORDER BY imsi", [DB_STMT_SEL_FILTER_IMEI] = "SELECT " SEL_COLUMNS " FROM subscriber WHERE imei LIKE $search ORDER BY imei", |