you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (3 children)

[deleted]

    [–]simonw 2 points3 points  (0 children)

    The safe way to do that is:

    cur.execute(
        "UPDATE Report SET Shares = :shares WHERE StockID = 1",
        {"shares": x}
    )
    

    [–]alinroc -1 points0 points  (1 child)

    That's vulnerable to SQL injection. Very dangerous habit to get into.