Python Forum
MySQLdb, problem with query with user-defined variables
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MySQLdb, problem with query with user-defined variables
#6
Ok, so it looks like you're only using those variables as sort of config values, since you never modify them. Why not eliminate them entirely, define the values in python, and pass them to .execute()?

OR, you can try passing multi=True to .execute():
https://dev.mysql.com/doc/connector-pyth...ecute.html
Reply


Messages In This Thread
RE: MySQLdb, problem with query with user-defined variables - by nilamo - Feb-03-2017, 06:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  A problem with defining variables meru120 7 4,956 Jul-05-2024, 06:06 PM
Last Post: deanhystad
  User-defined function to reset variables? Mark17 3 3,141 May-25-2022, 07:22 PM
Last Post: Gribouillis
  Multiple user defined plots with secondary axes using for loop maltp 1 2,563 Apr-30-2022, 10:19 AM
Last Post: maltp
  WHILE Loop - constant variables NOT working with user input boundaries C0D3R 4 2,495 Apr-05-2022, 06:18 AM
Last Post: C0D3R
  Setting permanent user variables in Windows coder420 2 2,138 Jan-04-2022, 10:42 AM
Last Post: Larz60+
  Problem Using SQL Placeholder In MySQL Query AdeS 11 9,881 Jul-31-2021, 12:19 AM
Last Post: Pedroski55
  Problem restricting user input in my rock paper scissors game ashergreen 6 6,348 Mar-25-2021, 03:54 AM
Last Post: deanhystad
  Running scripts and location of saved interpreted user-defined classes and functions leodavinci1990 3 3,364 Aug-25-2020, 03:43 AM
Last Post: micseydel
  python library not defined in user defined function johnEmScott 2 5,003 May-30-2020, 04:14 AM
Last Post: DT2000
  Problem with user defined main menu function stefzeer 3 3,264 Mar-27-2020, 06:12 AM
Last Post: buran

Forum Jump:

User Panel Messages

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