On Saturday 16 November 2002 00:53, [EMAIL PROTECTED] 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?
UPDATE table_name SET col_name = REPLACE(col_name, '.pdf', '.zip');
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
Politicians should read science fiction, not westerns and detective stories.
-- Arthur C. Clarke
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php