Re: update more "same" fields at the same time
| From: | Simon | Date: | Wed, 15 Jan 2003 12:08:38 +0000 |
| Subject: | Re: update more "same" fields at the same time | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131682@lists.php.net to get a copy of this message | ||
> If you want to update all the records that have subcat = $_GET[a] with
> the same values then you can do somethink like this:
>
> $subcat = $_POST['a'];
> $qsubcat = $_POST['subcat'];
>
> "update tables set
> field1=$_POST['textfield'],field2='$_POST['textfield1']' where
> subcat='$qsubcat'"
>
> I don 't know if this query will execute correctly because i don 't know
> the datatypes of your table fields.
> I prefer writing update and insert php scripts independed from select
> pages.It 's easier to read.
>
thing is that i want to update same field 6 times with one mysql query. lets
say i have 6 names in one mysql table. now I wand to update all six of them
with one query.