Преглед изворни кода

Table names are now encapsulated by backticks before being used in a query

Taddeus Kroes пре 13 година
родитељ
комит
c2b2219fa7
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      generate.py

+ 1 - 1
generate.py

@@ -269,7 +269,7 @@ def read_tables(conn):
 
 def read_fields(conn, table):
     cur = conn.cursor(mysql.cursors.DictCursor)
-    cur.execute('show columns from %s' % table)
+    cur.execute('show columns from `%s`' % table)
     fields = cur.fetchall()
     cur.close()
     return fields