Page 1 of 1
Modify several rows of Mysql table.
Posted: Mon Sep 07, 2009 3:55 pm
by fotofx
I need to output all the rows in a table with a checkbox next to each row. Then I am going to modify a field in only the selected rows. The modification will be the same to each row so there will only be a minor data change. I have never done anything quite like this before and dont really know where to begin. I can select and output the rows but how would I do the checkbox to only modify those rows?
Thanks
Steve
Re: Modify several rows of Mysql table.
Posted: Mon Sep 07, 2009 4:19 pm
by oscardog
You could set the checkboxes, when outputted, with their names as the of the SQL table?

Re: Modify several rows of Mysql table.
Posted: Mon Sep 07, 2009 4:34 pm
by jackpf
I'd personally put the checkboxes into an array (using []). Then loop through them and and concatenate a string that will update the relating rows.

Re: Modify several rows of Mysql table.
Posted: Mon Sep 07, 2009 5:08 pm
by fotofx
I know I am asking allot being i haven't posted any partial code, but can anyone give me an example?
Thanks
Steve