1for name in ('bar','foo'):
2 cursor.execute("SELECT rowid FROM components WHERE name = ?", (name,))
3 data=cursor.fetchall()
4 if len(data)==0:
5 print('There is no component named %s'%name)
6 else:
7 print('Component %s found with rowids %s'%(name,','.join(map(str, next(zip(*data))))))