#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    166
    Rep Power
    15
    I have 300 records containing a character string (a URL) that I need to change (!)

    Is there a method /PHP script? that I can use to go through a field.table and replace all instances of "oink" with "foo"

    Thanks
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,643
    Rep Power
    4492
    I love manuals.

    UPDATE your_table SET your_field = REPLACE(your_field,'oink','foo');

    ---JH

    ------------------
    *************************************************************
    * The manual can probably answer 90% of your questions...
    *
    * PHP Manual. www.php.net/manual
    * MySQL Manual: www.mysql.com/documentation/mysql/bychapter
    *************************************************************

Similar Threads

  1. maysqladmin drop database syntax?
    By Slurm in forum MySQL Help
    Replies: 1
    Last Post: February 17th, 2004, 05:07 AM
  2. global variables + oscommerce
    By gbow in forum PHP Development
    Replies: 2
    Last Post: February 12th, 2004, 03:08 AM
  3. search and replace ..
    By ajay201975 in forum Perl Programming
    Replies: 2
    Last Post: February 12th, 2004, 02:52 AM
  4. Need some help with the "Global Moderator" Mod
    By Poohbaby77 in forum PHP Development
    Replies: 0
    Last Post: February 5th, 2004, 01:14 AM
  5. creating database & tables using ASP
    By pdxlooie in forum ASP Programming
    Replies: 2
    Last Post: December 26th, 2003, 05:27 PM

IMN logo majestic logo threadwatch logo seochat tools logo