So I have 3 tables: Users, Services, and MappedUsers. The
MappedUsers Table first two columns are userID and serviceID,
combining for a primary key. They are also foreign keys back to the
users & services tables. Everytime a new user is created, there
is an entry into the MappedUsers table for each service. So if
there were 4 services available(1-4), There would be 4 inserts into
MappedUsers like with special attention being paid to the 3rd &
4th column in that table: name(string) & allowed (boolean).
What I am trying to do is dynamically create the FormItems
for TextInput and Checkbox for these two items. So far I do have it
dynamically generating the TextInputs & checkboxes complete
with data already stored in the database. What I CANNOT figure out
is how to update the DB by typing new values, checking/unchecking
the boxes, whatever. How does it know which dynamically created row
is associated with which serviceID, etc in the table?
But I cannot figure out how it works. I have posted my mxml
below, and all the way at the bottom of it is the repeater. The
selectHandler function is what calls the PHP, executes the query,
and returns the data object, then I push that object into the
singleUser array and obviously it displays the data in the
repeater. From there, updating the tables based on changes I make
to what's in the repeater is where I am stuck.