Reputation: 143
Hi everyone I am trying to create table and add items on MYSQL but I always get this error
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near at line 6"
Can't track the specific problem any idea please? Here's my code
import mysql.connector
class GpdealsSpiderPipeline(object):
def __init__(self):
self.create_connection()
self.create_table()
def create_connection(self):
self.conn = mysql.connector.connect(
host = 'www.host1.com',
user = 'userhost',
password = 'samplepassword',
database = 'databasesample'
)
self.curr = self.conn.cursor()
def create_table(self):
self.curr.execute("""create table saleitems_hm(
hm_title text,
hm_regular_price text,
hm_sale_price text,
hm_photo_url text,
hm_description_url,
)""")
Please Help me Thank you
Upvotes: 0
Views: 131