All Questions
Tagged with python-2.7 mysql
765
questions
0
votes
0
answers
17
views
flask-sqlalchemy delete row not succeed?
I use flask-sqlalchemy as my orm. And I have a post_file request needs to response immediately. Thus, I use multiprocessing to forward the request to post_file_async. Here I need to delete some rows. ...
0
votes
0
answers
46
views
Script PLSQL developer run in python jupyter notebook
I have the problem with my script. The script works good, but not for big script. I would like to use big SQL script with left join , inner join and etc. but after this script does not work. Why Can ...
4
votes
0
answers
260
views
SqlAlchemy extending an existing query with additional select columns from raw sql
I'm quite new to SQLAlchemy and Python, and have to fix some bugs in a legacy environment so please bear with me..
Environment:
Python 2.7.18
Bottle: 0.12.7
SQLAlchemy: 1.3.24
MySQL: 5.7
Scenario: I ...
0
votes
0
answers
15
views
how can I compare similarity between strings from two tables (one to many) in MySQL table using python [duplicate]
I have 90K rows in "table1" and 95k rows in "table2". I tried with the below code to compare every rows from table1 to table2. But it takes 1 minute to complete the 1 row from ...
3
votes
1
answer
3k
views
f"MySQL Connector/Python C Extension not available ({exc})" SyntaxError: invalid syntax
I'm making a program that requires MySQL connection. I'm using jupyter notebook & made the connection with this syntax :
!pip install mysql-connector-python
import pandas as pd
import numpy as np
...
0
votes
1
answer
200
views
how to prepare string variables in yaml for python that asign a variable by themselfs
I need to build a Python-Script in Python 2.7 that makes a Select-Query to a Specific Database. This Script has to be reusable for certain reasons, but the Query has to be Flexible.
I wanted to add ...
-1
votes
1
answer
24
views
i wrote a program to display a table using panda. now i want to save the table in a database. the codes should be continued
***import pandas as pd
employees = {'Name of Machining': ['milling','Drilling','Drilling','Chamfering'],
'Speed': [275,275,275,275],
'Feed': [0.28,0.03,0.03,0.28],
...
0
votes
0
answers
429
views
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb. Did you install mysqlclient or MySQL-python?
I wanted to install MySQL database for a Django Project which is developed in Python 2.7
I watched a lot of StackOverflow questions and responses... and I could not find a solution, but what i found ...
1
vote
1
answer
452
views
Migrating sqlite to mysql using Django - tables not created
I’m new to Django and web servers, and have been stuck for a few days. I inherited a Django app, python version 2.7 and Django version 1.9. The app was previously using the default SQLite databases. I ...
0
votes
1
answer
1k
views
None type object has no attribute "tosql"
df.to_sql('newcmc', con = engine, if_exists='append',index = False)
While running the above code it is showing None type object has no attribute "to_sql"
0
votes
1
answer
21
views
How to add a random value every time when user logs in in python using sql and update it every time
I am trying to implement a method (log_in())that will allow me to add a random number to a column called "money" every time a user logs in to the system. For example, when we execute log_in()...
-1
votes
1
answer
268
views
I want to execute a query in python by template.format method where the argument in format comes by transversing a string.I'm getting an error
for i in range(0,len(l)):
c = l[(i)]
st = 'select Item_name,Price from stationary where code = {}'.format(c)
cur1.execute(st)
data = cur1.fetchall()
for j in data:
print(j)
st1 = 'select sum(Price)...
0
votes
1
answer
205
views
Not Working filter search using python and mysql
It is showing me no record after writing the 1. I have data on my database for 1. Can someone please help me to know where I am wrong here?
def searchDB():
try:
sqlCon = mysql....
0
votes
1
answer
278
views
Start XAMPP Control Panel Apache MySql from Python 2.7 script
I would like to automatically start Apache and MySql of the XAMPP Control Panel without having to make it to the users of the application. Using Python 2.7
The buttons are highlighted below.
Thanks ...
0
votes
0
answers
114
views
connecting and inserting data into mysql database 5.5 using Python 2.7
Can you please help me with this issue here.
I am getting below error
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\bots\communication.py", line 1703, in ...