How to rename a mysql field

  • basketmen
  • Student
  • Student
  • basketmen
  • Posts: 68

Post 3+ Months Ago

in this picture i want to change "Recent Blog Entries" to just "Blog"

Image









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)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13503
  • Loc: Florida

Post 3+ Months Ago

When you use aggregate functions such as COUNT, SUM, etc, you're working with anonymous virtual rows returned from the database containing the aggregate values. Since there's no real link between these anonymous rows and the database table, there's actually nothing to edit when it comes to the results of such queries.

What you can do though, is alter the "title" field in each row with a different query.

Code: [ Select ]
UPDATE `zp_entermodule_link`
SET title = 'Blog'
WHERE title = 'Recent Blog Entries'
  1. UPDATE `zp_entermodule_link`
  2. SET title = 'Blog'
  3. WHERE title = 'Recent Blog Entries'


Once that is done, the aggregate functions will group by using the new value.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 70 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.