Category : mysql

I m using the following code in Python-mysql. Rollback isn’t working, can someone please point out what am I doing wrong. try: cnx.start_transaction() engine=connectEngine.connect() df_ord_main.to_sql(‘maintbl’, con = engine, if_exists = ‘append’, chunksize = 1000, index=False) df_ord_mainDets.to_sql(‘Detstbl’, con = engine, if_exists = ‘append’, chunksize = 1000, index=False) if cnx.is_connected() == False: except Error as error: print(error) ..

Read more

This is the image of my table When I run my python code and insert all of the values for my table I receive the error that my risk level has an incorrect integer value the code for the insert statement is: def register_site(): screen13 = Tk() sitename_info = sitename2.get() region_info = region.get() risklevel_info = ..

Read more

I am working on a school project of creating a Hospital Management System using Python and MySQL, I have connected MySQl with Python using mysql.connector. I have created separate tables for Doctors and Patients, now I want add a last column in both of the Doctor’s and Patient’s Table which shows to whom they have ..

Read more

from instabot import Bot bot = Bot() bot.login(username = "user_name", password = "user_password") bot.upload_photo("Technical-Scripter-2019.jpg", caption ="Technical Scripter Event 2019") This is auto post image to instagram, but how to change .jpg to direct get image grnerated, to send to instagram?(by click *share * button) Source: Python..

Read more

ERROR: Command errored out with exit status 1: … cwd: /tmp/pip-install-0w18_khs/mysqlclient/ Complete output (12 lines): /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-0w18_khs/mysqlclient/setup.py", line 15, in <module> metadata, options = get_config() File "/tmp/pip-install-0w18_khs/mysqlclient/setup_posix.py", line 65, ..

Read more

I tried to create a search function on my program. When i try to search data it’s working properly, but whenever i try to search some data that didn’t contain on my database, error my occur. i tried if else statement but it didn’t work. import mysql.connector from datetime import datetime con = mysql.connector.connect( host ..

Read more