Re: database update question
| From: | Brad Bonkoski | Date: | Fri, 15 Nov 2002 22:44:12 +0000 |
| Subject: | Re: database update question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-23412@lists.php.net to get a copy of this message | ||
If you wish to update all of them, then just eliminate the id condition.
chip.wiegand@simrad.com wrote:
> I have a database with several hundred entries of file names that end with
> .pdf. I have converted
> all those docs to .zip, now I need to change all the entries in the
> database to .zip. I tried to use
> update table_name set col_name='%.zip' where col_name like '%.pdf'
> && id
> = '11'
> but of course that changed the file name for id 11 to %.zip. Is there a way
> to change all the
> entries from .pdf to .zip without writing an update statement for each
> individual row?
>
> --
> Chip Wiegand
> Computer Services
> Simrad, Inc
> www.simradusa.com
> chip.wiegand@simrad.com
>
> "There is no reason anyone would want a computer in their home."
> --Ken Olson, president, chairman and founder of Digital Equipment
> Corporation, 1977
> (They why do I have 8? Somebody help me!)
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php