Spaces:
Running
Running
ahmadgenus
commited on
Commit
·
5896773
1
Parent(s):
6d48e44
latest_app
Browse files
app.py
CHANGED
@@ -41,11 +41,12 @@ with posts_col:
|
|
41 |
conn = get_db_conn()
|
42 |
cur = conn.cursor()
|
43 |
cur.execute("""
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
49 |
posts = cur.fetchall()
|
50 |
cur.close()
|
51 |
conn.close()
|
|
|
41 |
conn = get_db_conn()
|
42 |
cur = conn.cursor()
|
43 |
cur.execute("""
|
44 |
+
SELECT reddit_id, title, post_text, comments, metadata, created_at
|
45 |
+
FROM reddit_posts
|
46 |
+
WHERE keyword = ?
|
47 |
+
ORDER BY datetime(created_at) DESC;
|
48 |
+
""", (keyword,))
|
49 |
+
|
50 |
posts = cur.fetchall()
|
51 |
cur.close()
|
52 |
conn.close()
|