Python Forum
Need help on how to include single quotes on data of variable string
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help on how to include single quotes on data of variable string
#4
You shouldn't be using str.format to construct queries. Use your database's placeholder syntax instead. See, for example https://bobby-tables.com/.
hani_hms and buran like this post
Reply


Messages In This Thread
RE: Need help on how to include single quotes on data of variable string - by ndc85430 - Jan-10-2023, 06:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with writing monitored data to mysql upon change of one particular variable donottrackmymetadata 3 387 Apr-18-2024, 09:55 PM
Last Post: deanhystad
  How to include one script into another? MorningWave 8 600 Mar-21-2024, 10:34 PM
Last Post: MorningWave
  how include a python code in notpad++ plugin akbarza 2 692 Sep-25-2023, 08:25 PM
Last Post: deanhystad
  Replacing String Variable with a new String Name kevv11 2 839 Jul-29-2023, 12:03 PM
Last Post: snippsat
  Regex Include and Exclude patterns in Same Expression starzar 2 859 May-23-2023, 09:12 AM
Last Post: Gribouillis
Video doing data treatment on a file import-parsing a variable EmBeck87 15 3,048 Apr-17-2023, 06:54 PM
Last Post: EmBeck87
  python sql query single quote in a string mg24 1 1,134 Nov-18-2022, 08:01 PM
Last Post: deanhystad
  python r string for variable mg24 3 2,970 Oct-28-2022, 04:19 AM
Last Post: deanhystad
  USE string data as a variable NAME rokorps 1 1,010 Sep-30-2022, 01:08 PM
Last Post: deanhystad
  Removing Space between variable and string in Python coder_sw99 6 6,432 Aug-23-2022, 01:15 PM
Last Post: louries

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020