Re: Foreach and mydql_query problem
[email protected] (Karl-Arne Gjersøyen)
| Newsgroups | php.general |
|---|---|
| Message-ID | <CAN78Z6B9yQwj0+r56UyfC_DRVN3o_sAS0Gd51Dmu=9e-7o-+uQ@mail.gmail.com> |
2013/7/22 Tim Streater <[email protected]> > On 22 Jul 2013 at 12:56, Karl-Arne Gjersøyen <[email protected]> wrote: > > > Yes, i know that only one a singe row is updated and that is the problem. > > What can I do to update several rows at the same time? > > Which several rows? The row that will be updated is that (or those) that > match your WHERE clause. Seems to me you should make sure your WHERE is > correct. > Thanks, Tim. Yes the form is generated in a while loop and have <input type="number" name="number_of_items[]" size="6" value="<?php echo "$item"; ?>">. This field is in several product rows and when I update the form the foreach loop write all (5) products correct. But the other way: Update actual rows in the database did not work. Only the latest row is updated.. Karl