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

    Join Date
    Sep 2012
    Posts
    3
    Rep Power
    0

    Sql query to alter value. Help me write this please?


    So here is the short.
    I have an sql table

    "_community_access_log"
    inside this particular table are columns and one of them is called
    "Domain"
    I need to edit the value of this column from whatever it is
    to read "mydomain.com"

    The reason i put from whatever it is
    is because the value currently can be 3 or 4 different things.
    I am looking for a way to edit this specific column value no matter what it reads, to be changed to "mydomain.com"


    Currently it appears 15,000 times in the database and its messing up certain user functions in my CMS
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Mar 2008
    Posts
    1,927
    Rep Power
    378
    UPDATE my_table SET my_column = 'something';
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    3
    Rep Power
    0
    ok in that case it would mean
    i need to goto that specific table
    click it
    when it loads in phpMYadmin i click Browse if not there already
    and then click Query to run:

    UPDATE *_community_access_log SET domain = 'the domain i want';

    and in this case " * " would equal my table prefix
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    3
    Rep Power
    0
    yo will just NOT believe this

    i ran a search for the alternate link that is showing up in domain

    i then ran the sql query to edit it
    it ran fine
    all referances were gone

    but then i waited a few minutes and its all back again
    it keep coming up on its own

IMN logo majestic logo threadwatch logo seochat tools logo