我正在尝试使用db_access中的SQL索引创建一个有组织的表格式,但是当我运行我的脚本时,我收到错误IndexError:tuple index超出范围。
我在db_access脚本中尝试了其他SQL语句,我得到了同样的错误。
Data.py
def get_locations_for_area(area_id):
return do_command('select * from location where location_area = ?', [area_id])
def get_measurements_for_location(location_id):
return do_command('select * from measurement where measurement_location = ? ', [location_id])
def get_categories_for_area(area_id):
return do_command('select * from category_area NATURAL JOIN category WHERE area_id=?', [area_id])
我的db_access脚本
{{1}}
编辑:数据库sakila文件:http://ksuweb.kennesaw.edu/~bsetzer/4720fa15/extra/databases/measurements/measures.sqlite