Sql and updating one column
your problem likely lies in the php code, something about constructing variables and looping (i'm guessing -- i don't do php so i only gave your code a cursory glance) however, since you asked this question in the mysql forum, let me give you a mysql answer redesign your table, normalize it to first normal form you have repeating columns in answer One, answer Two, answer Three these should be three rows in a normalized table from there, the php will be slightly different Hello r937! To address your normalization suggestion, here is my table structure (it goes into a tiny bit more detail; my first example was a very generalized one, this one is also generalized to a certain extent) - and there is a specific reason why I have designed it so...which I will explain in a bit.// Users Only take the survey 'foobar' once, and can // edit the answers if and only if they have not completed the survey.
I understand that I can do this with one row and it work with a nested select statement in an update statement.table_member ( member_id, taking Foobar, foobar Completed, foobar Start Time, foobar End Time ) //foobar is actually a "results" table.;) table_foobar ( foobar_id, member_id, question_id, answer One, answer Two, answer Three, answer Four ) //Multiple questions for a single foobar Main survey.Thing is, there have been no concerns about normalization as I have had no problems with data insertion, querying results, reporting the answers, association of answers with members, etc!The only thing I am trying to solve is updating the database with one query instead of (1 to N) number of insert queries depending on how many "items" are listed.