+ Reply to Thread
Results 1 to 3 of 3

 

Thread: PHP and MySQL - Find and Replace - Update

  1. #1
    Typing with both fingers.

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Allt Y Coed Farm, North Pembrokeshire
    Posts
    4,122
    Thanks
    246
    Thanked 197 Times in 156 Posts


    Hi all

    I have a database with all the product feeds from TD, AW and Buyat lobbed in and I want to search through it and 'find and replace' a certan text string in the 'ProductImage' field.

    Does anybody know of the SQL command I can run in order to achieve this.

    For any examples please use the following format, so i can understand (it also describes the basic function i would like)

    Find 'foo1' in field named 'ProductImage' and replace with 'foo2'.

    Thanks in advance for any help.

  2. #2
    Ian Ebbs

    Status
    Offline
    Join Date
    Aug 2003
    Location
    England
    Posts
    1,096
    Thanks
    5
    Thanked 6 Times in 2 Posts
    update tablename set ProductImage = "foo2" where ProductImage = "foo1";

    affiliates4u Fantasy Football Winner 2007/08

  3. #3
    Typing with both fingers.

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Allt Y Coed Farm, North Pembrokeshire
    Posts
    4,122
    Thanks
    246
    Thanked 197 Times in 156 Posts
    THANKS SO MUCH





    Sorry for shouting but thats 'soooooo' easy to understand.


    I thought it was going to be a long old complexed piece of code.


    Nice One

    Cheers - made my day.

+ Reply to Thread


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2