(Easy enough) How to rename a mysql field

Discussion in 'MySQL' started by basketmen, Jan 26, 2009.

  1. #1
    from this picture i want to change "Recent Blog Entries" to just "Blog"

    [​IMG]









    how to make it guys, or what command i need to run, there is no edit button there (thats like usually showing in table edit)
     
    basketmen, Jan 26, 2009 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Run this query to update, it is better to keep the backup of the table before running this query.
    UPDATE zp_entemodule_link SET
    title = 'Blog'
    WHERE title = 'Recent Blog Entries'
    Code (markup):
     
    mwasif, Jan 26, 2009 IP
  3. Christian Little

    Christian Little Peon

    Messages:
    1,753
    Likes Received:
    80
    Best Answers:
    0
    Trophy Points:
    0
    #3
    
    UPDATE zp_entemodule_link SET title="Blog" WHERE title="Recent Blog Entries"
    
    Code (markup):
    That'll do it, but with 30,000+ rows it will probably take 5-10 minutes to run if you are on a shared host.
     
    Christian Little, Jan 26, 2009 IP
  4. basketmen

    basketmen Well-Known Member

    Messages:
    837
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    130
    #4
    ah i am sorry, maybe there is problem with my connection or in dp server before so its post in two thread, i will tell mod to delete the other thread




    thank you for your answer thought

     
    basketmen, Jan 26, 2009 IP