Category : mysql

I’ve made a tkinter form that’s supposed to enter values into a MySQL table. However, when i enter the appropriate values int the form, I get the error message created by me ("All fields are required"). In the following code, a=task_name.get() [string], b=student_subject.get() [string], c=due_date.get() [int], d=priority.get() [int], e=task_type.get() [string], and f=date_added.get() [int]. ”’ def ..

Read more

I’ve created a form to insert values for a record into a MySQL table. This is the code for the insert function: ”’ def action(): if a=="" or b=="" or c=="" or d=="" or e=="" or f=="": messagebox.showmessage("Error" , "All Fields Are Required" , parent = wintask) else: con = mysql.connector.connect(host="<>", user="<>", password="<>", database="<>") cur ..

Read more

I want to capture the entire sub-query irrespective of whether there’s a concat or substring function in between (i.e. ignore another bracket opening and closing within sub-query. Case 1: No concat or sub-string function in select In: (select t1.col1 as alias1 from db.tb where t1.col1=’val1′) alias2 Out: (select t1.col1 as alias1 from db.tb where t1.col1=’val1′) ..

Read more

I am trying to connect to a database and for that I am using mysql-connector. The code is correct but I get the following error message: ERROR: HTTP error 404 while getting https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.1.3.tar.gz If I use command window and type the following: pip search mysql-connector I get the error: ERROR: XMLRPC request failed [code: -32500] ..

Read more

I have a python program in which i want to update details using mysqlconnector in my data base but i am getting Traceback (most recent call last): File "d:I8Labsdevided githubrepo_data.py", line 116, in <module> getRepos() File "d:I8Labsdevided githubrepo_data.py", line 101, in getRepos for repo in cursor: File "C:Python39libsite-packagesmysqlconnectorcursor_cext.py", line 718, in fetchone return self._fetch_row() File ..

Read more

from flask_app.config.mysqlconnection import connectToMySQL from datetime import datetime import math def time_span(self): now = datetime.now() delta = now – self.created_at print(delta.days) print(delta.total_seconds()) if delta.days > 0: return f"{delta.days} days ago" elif (math.floor(delta.total_seconds() / 60)) >= 60: return f"{math.floor(math.floor(delta.total_seconds() / 60)/60)} hours ago" elif delta.total_seconds() >= 60: return f"{math.floor(delta.total_seconds() / 60)} minutes ago" else: return f"{math.floor(delta.total_seconds())} ..

Read more

So I’ve been scowering the web for an answer, but haven’t found one that quite satisfies my curiosity/anxiety. I’m running a python script to insert data from a collection of XL files into a database. Is there any possibility of security breaches while running the script locally? I think my hesitation is derived from having ..

Read more