[Zope-DB] looping through
Fri, 31 Aug 2001 07:41:27 -0400
I hope I'm in the right place. I'm working on a gradebook program for
teachers, and at this point I want a teacher to be able to add an assignment.
I've got a basic table that has the student name, id, assignment, and grade,
with a row for each assignment/grade for each student. I'm at the point now
where the teacher adds a new assignment and I want <something> to go through
the table, and create new rows for each student, but with a null value for
the grade which will be entered later. How do I do that? I'm thinking of just
going through the table with a SELECT DISTINCT student-id clause (that way I
only create the rows once for each student assignment), but that seems like
two steps, one for the SELECT DISTINCT, but then adding new rows based on
that query is baffling me.
Thanks for the help!