removed sql changes

This commit is contained in:
Chumva 2018-04-27 13:35:37 +03:00
parent 7db4366355
commit da32bf5906

View file

@ -208,10 +208,11 @@ public class TravelDbHelper {
SQLiteConnection conn = openConnection(); SQLiteConnection conn = openConnection();
if (conn != null) { if (conn != null) {
TravelArticle travelArticle; TravelArticle travelArticle;
String lang = application.getLanguage(); SQLiteCursor cursor = conn.rawQuery("SELECT * FROM "
SQLiteCursor cursor = conn.rawQuery("SELECT * FROM wikivoyage_articles" + ARTICLES_TABLE_NAME
+ " WHERE title IN (SELECT title FROM popular_articles WHERE lang = ?" + " WHERE article_id IN (SELECT article_id FROM "
+ " ORDER BY RANDOM()) ORDER BY RANDOM() LIMIT 100", new String[]{lang}); + ARTICLES_TABLE_NAME
+ " ORDER BY RANDOM() LIMIT 100) LIMIT 100", null);
if (cursor.moveToFirst()) { if (cursor.moveToFirst()) {
do { do {
travelArticle = readArticle(cursor); travelArticle = readArticle(cursor);