out = print_query(s,(),newLine)
return out
+def people_had_child_at_age(age,newLine):
+
+ s = "select p1.bornYear - p2.bornYear as age, p1.name, p1.ID"\
+ +",p2.name,p2.ID FROM"\
+ +" parents INNER JOIN people p1"\
+ +" ON parents.ID = p1.ID"\
+ +" INNER JOIN people p2"\
+ +" ON parents.parentID = p2.ID"\
+ +" WHERE age = ?"
+
+ t = (int(age),)
+
+ out = ''
+ out = 'At age ' + str(age) + ' :'
+ for row in run_query(s,t):
+ out = out + newLine
+ out =out + name_html([row[3],row[4]],newLine) + ' had '\
+ +name_html([row[1],row[2]],newLine)
+
+ return out
+
+
def all_ancestors(personID,newLine):
#find parents
s = "SELECT people.Name,parents.parentID FROM"\