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
  User-defined function to reset variables? Mark17 3 1,738 May-25-2022, 07:22 PM
Last Post: Gribouillis
  Multiple user defined plots with secondary axes using for loop maltp 1 1,566 Apr-30-2022, 10:19 AM
Last Post: maltp
  WHILE Loop - constant variables NOT working with user input boundaries C0D3R 4 1,575 Apr-05-2022, 06:18 AM
Last Post: C0D3R
  Setting permanent user variables in Windows coder420 2 1,476 Jan-04-2022, 10:42 AM
Last Post: Larz60+
  Problem Using SQL Placeholder In MySQL Query AdeS 11 6,357 Jul-31-2021, 12:19 AM
Last Post: Pedroski55
  Problem restricting user input in my rock paper scissors game ashergreen 6 4,742 Mar-25-2021, 03:54 AM
Last Post: deanhystad
  Running scripts and location of saved interpreted user-defined classes and functions leodavinci1990 3 2,616 Aug-25-2020, 03:43 AM
Last Post: micseydel
  python library not defined in user defined function johnEmScott 2 3,959 May-30-2020, 04:14 AM
Last Post: DT2000
  Problem with user defined main menu function stefzeer 3 2,470 Mar-27-2020, 06:12 AM
Last Post: buran
  User defined functions inside other user defined functions WildP 1 2,000 Jan-29-2020, 04:57 PM
Last Post: Clunk_Head

Forum Jump:

User Panel Messages

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