On Sun, 8 Apr 2001, Stephen U. Lee wrote:

> i want to replace all occurences of www to http://www in all columns of a
> table.
> the column contains blocks of text.
> 
> is there any way to do this directly in mySQL?

Check the manual for the infinite String manipulation functions.

If all your records start with a 'www' then the easy way out is:
UPDATE table SET column_name=CONCAT("http://",column_name);

If not then, again the easy way out is:
UPDATE table SET column_name=CONCAT("http://",column_name) WHERE column_name LIKE 
'www%';


regards,
thalis

> 
> thankx. =)
> ---------------------------------------------------------------------------
> Stephen U. Lee                                      [EMAIL PROTECTED]
> (632) 714-9924                                               (0917)9068115
> ===========================================================================
>                              f o r t h m e d i a
> http://www.forthmedia.net                           [EMAIL PROTECTED]
> ---------------------------------------------------------------------------
> 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to