Re: Foreach and mydql_query problem

From: Date: Mon, 22 Jul 2013 12:20:34 +0000
Subject: Re: Foreach and mydql_query problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-321674@lists.php.net to get a copy of this message
2013/7/22 Tim Streater <tim@clothears.org.uk> > On 22 Jul 2013 at 12:56, Karl-Arne Gjersøyen <karlarneg@gmail.com> 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

« previous php.general (#321674) next »