+ def get_allrecords1(self, field, struct):
+
+ """return records"""
+ cur = self.conn.cursor()
+ cur.execute("select distinct data.id "
+ "from data left join relation on data.id=relation.id_data "
+ "where relation.id_struct=?", (struct,))
+ self.data = {}
+ cur1 = self.conn.cursor();
+ for row in cur:
+ #print row
+ cur1.execute("select data.value from data "
+ "left join field on data.id_field=field.id "
+ "where data.id=? and field.type=1 "
+ "order by field.sort", (row[0],));
+ str = "";
+ for row1 in cur1:
+ str += row1[0]
+ str += " "
+ self.data[row[0]] = str;
+ return self.data
+