msen7437 / FlaskBlog

Website to upload, like and comment posts.
0 stars 0 forks source link

Comments #1

Open msen7437 opened 3 years ago

msen7437 commented 3 years ago

I want to comment posts and comments under posts. Database must might refactored

msen7437 commented 3 years ago

Basically done

msen7437 commented 2 years ago

Now fully done, but i want to display the number of comments under each post or comment: Scratch code

def get_number_of_comments(post_id): sql=f"SELECT COUNT(some_id) WHERE post_id = {post_id}" comm_num = cur.execute(sql) return comm_num

Volleicht in einer loop durchlaufen lassen, oder ganze liste mit zahlen zurückgeben.