Menu

Remove slashes

Help
2005-01-31
2012-09-19
  • Dagur Páll Ammendrup

    Call me stupid, but I don't see any quick way to remove slashes from the fetched data. Any help?

     
    • Andy Dustman

      Andy Dustman - 2005-01-31

      Give an example of what you are doing, and I'll show you why you shouldn't have to do any such thing.

       
      • Dagur Páll Ammendrup

        What I have looks something like this:

        query = """INSERT INTO posts (id, forum_id, ...) VALUES (%s, %s, ...)"""

        cur.execute(query, (post_id, forum_id, ...))

         
      • Dagur Páll Ammendrup

        I just figured it out. I was doing db.escape() first and forgotten it. Sorry about that.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.