$10 for 1 MySQL Line

Discussion in 'Programming' started by Michael-Martin, Jan 24, 2008.

  1. #1
    When exporting my database from an old host, my database content got filled with this set of characters, "Â"

    I tried to fix it myself, but got my query quite badly wrong...

    So, $10 via PayPal to whoever sends me the line that will search the database and delete all instances of the "Â" (Including the comma).

    Thanks. :)
     
    Michael-Martin, Jan 24, 2008 IP
  2. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    mysql_query("DELETE FROM table_name WHERE column_name='Â'");

    Don't know, lol. I don't understand your question. Change the charset perhaps? How about I do it manually? :D
     
    Dondon2d, Jan 24, 2008 IP
  3. tarponkeith

    tarponkeith Well-Known Member

    Messages:
    4,758
    Likes Received:
    279
    Best Answers:
    0
    Trophy Points:
    180
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    if you send me a copy of the database file, i can check it out...

    why not just open it in notepad and do a find/replace?
     
    tarponkeith, Jan 24, 2008 IP
  4. dancom96

    dancom96 Well-Known Member

    Messages:
    1,556
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    105
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    UPDATE column_name SET column_name=REPLACE(column_name,'Â','');
     
    dancom96, Jan 24, 2008 IP
  5. Michael-Martin

    Michael-Martin Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Thanks for the replies everyone. NoobieDoobieDo has offered to do it by hand, so I went with him incase I break things again.

    Sorry to the others, but thanks anyway. :)


    Tarpon - Good idea, but the database is about 60MB. Last time I tried a find/replace, my whole computer crashed. :(
     
    Michael-Martin, Jan 24, 2008 IP
  6. Mobifrendz.Org

    Mobifrendz.Org Banned

    Messages:
    320
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    oK BRO,PM ME NOW WITH MORE DETAILS AND I WILL DO IT FOR YOU..
     
    Mobifrendz.Org, Jan 24, 2008 IP
  7. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    As Seller:
    100% - 0
    As Buyer:
    100% - 1
    #7
    update test set col1 = replace(col1, "Ã,", "");


    replace col1 by fieldname from table

    replace test by tablename

    if more that one fields hv this use this query many times by just changing field names

    Regards

    Alex
     
    kmap, Jan 25, 2008 IP
  8. programmar

    programmar Active Member

    Messages:
    149
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    63
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8
    I will do this work for you.

    Here is it
    UPDATE `table_name` SET field_name=replace(field_name,’search_text’,'replace_text’);

    Thanks
     
    programmar, Jan 25, 2008 IP