columns name in get_table_columns need to be enclosed in backticks
def get_table_columns(read_table_name):
"""
Return the list of column names (lowercase) for the given table
"""
query = """
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA='%s'
AND TABLE_NAME='%s'
""" % (database_name, read_table_name)
column_names = set(["`"+row["COLUMN_NAME"].lower()+"`" for row in get_rows(query)])
return column_names
Original issue reported on code.google.com by jeanchri...@gmail.com on 7 Sep 2012 at 4:40
Original issue reported on code.google.com by
jeanchri...@gmail.com
on 7 Sep 2012 at 4:40