ahmadgenus commited on
Commit
5896773
·
1 Parent(s): 6d48e44

latest_app

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -41,11 +41,12 @@ with posts_col:
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 = %s
47
- ORDER BY created_at DESC;
48
- """, (keyword,))
 
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()