Marcus Ouimet wrote:
 
> One quick question, I am trying just replace part of the entry ie:
> change:
> /image/covers/009.jpg
> to
> image/covers/09.jpg
> 
> I have tried to update products set 'image/covers' where
> products_image like '/images/covers%'; but it seems to replace the whole
> field and not leave the trailing data. Ie it changes /image/covers/09.jpg to
> image/covers. Any ideas. Thanks in advance.

update products set
products_image=replace(products_image,'/images/covers','images/covers');

another possibility (and more proper I think) is to play with regexp-s.
you can define beginning of line, pattern and so on. Read the manual
about ¨regexp¨ examples.

-- 
MySQL Development Team
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Tonu Samuel <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Tallinn, Estonia
       <___/

---------------------------------------------------------------------
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