My code has no errors, I tried this same code on a different computer (it worked there) but here in my pc it isn't running. the following is a part of my code:
import pandas as pd
import mysql.connector
conn= mysql.connector. connect(host="localhost", password='K#1703@sparks',user="root", database = "Buttercup_brew_cafe")
cur=conn. cursor()
sql = ("SELECT if null (max(Q Code)+1,1) FROM Bill;")
cur. execute( sql )
results = cur.fetchall()
for row in results:
QCode=row[0]
the error.
I've also downloaded all the necessary packages for mysql connectivity with python such as mysql-connector-python, mysql-connector, pandas, numpy etc (using pip).
Can anyone help?
