RE: [PHP] Replacing the contents of one field with a group of selected records all at once -( without harming the rest of the database / records)
| From: | Smith, Benjamin | Date: | Fri, 18 Oct 2002 08:51:09 +0000 |
| Subject: | RE: [PHP] Replacing the contents of one field with a group of selected records all at once -( without harming the rest of the database / records) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-120477@lists.php.net to get a copy of this message | ||
No, it will work with ALL that have "APPLE" in that field.
If you wish to further pare the list down, you can add more conditions like update TABLE set
FIELDNAME='Banana' where FIELDNAME='Apple' and THISFIELD='THATVALUE'
OR SOMEOTHERFIELD='BLAH';
-----Original Message-----
From: dwalker [mailto:dwalker@healthyproductsplus.com]
Sent: Friday, 18 October 2002 6:14 PM
To: Smith, Benjamin; PHP
Subject: Re: [PHP] Replacing the contents of one field with a group of
selected records all at once -( without harming the rest of the database
/ records)
The update statement will only work with those records I've previously
listed???
-----Original Message-----
From: Smith, Benjamin <benjamin.smith@hp.com>
To: dwalker <dwalker@healthyproductsplus.com>; PHP
<php-general@lists.php.net>
Date: Friday, October 18, 2002 3:13 AM
Subject: RE: [PHP] Replacing the contents of one field with a group of
selected records all at once -( without harming the rest of the database /
records)
update TABLE set FIELDNAME='Banana' where FIELDNAME='Apple';
I assume that's what you're trying to do?
----Original Message-----
From: dwalker [mailto:dwalker@healthyproductsplus.com]
Sent: Friday, 18 October 2002 5:43 PM
To: PHP
Subject: [PHP] Replacing the contents of one field with a group of selected
records all at once -( without harming the rest of the database / records)
I have about 1000 records within my database -- I'd like to change 1 field
within 50 of the records. Is there a down and dirty method of populating
the one field within all 50 records at one time? The query to obtain the
50 records is pretty straight forward.
if the word APPLE were contained within the field for all 50 of the records,
how do I change the word to BANANA without harming any of the other
records??? I export my database as a kind of 'security' measure, but would
hate to try to bring it all back.
This email message and all attachements transmitted herewith are trade
secret and/or confidential informtion intended only for the
viewing and use of addressee. If the reader of this message
is not the intended recipient, you are hereby notified that
any review, use, communication, dissemination, distribution
or copying of this communication is prohibited. If you have
received this communication is error, please notify the sender
immediately by telephone or electronic mail, and delete this
message and all copies and backups thereof.
Thank you for your cooperation.