SQLite Forum

SELECT using variables
Login
With this suggestion, I do not gainsay the various guesses offered already.

If you intend to spend much time seeking help with technical issues, this article, "[How to ask for (and receive) technical help on the internet](https://raspi.tv/2017/how-to-ask-for-and-receive-technical-help-on-the-internet)", should help you to better help others to help you.

From what you've written, I have only the vaguest notion of what you are trying to accomplish.  However, I could rewrite your python code this way:<code>
  def get_posts(name, tag):
    if name == tag:
      posts = get_db().execute(
        'SELECT * FROM post ORDER BY created DESC'
      ).fetchall()
</code>, with the same results as your code. I doubt that is what you intended.

I also note, for other forum participants, that the OP seems to have posted the single, poorly formulated request for help, then effectively abandoned it. It makes me wonder if similarly hasty pleas have appeared in many fora, and suggests to me that little effort to provide assistance is warranted.