简体   繁体   中英

Newly added column not visible in phpMyAdmin

Firstly, this question has kind of been asked before here .

The problem is that after creating a new column by using ALTER TABLE , a new column does get created, but sometimes it isn't shown in the structure tab. When it occurs, using SELECT * FROM <tablename> does not display that column but SELECT <columnname> FROM <tablename> does. All queries on that column work perfectly.

Solution to this problem was rightly posted and it was simple -- to export that complete table, drop it and then import it again.

My question is why does such a thing happen? It's really a nuisance. It isn't a problem when working locally, I can always import/export/drop, but what I have a piece of code that continuously drops/creates new columns? Why does this happen and why does an import/drop/export do the trick? Is it a bug with phpMyAdmin?

PS: I am using phpMyAdmin with XAMPP v3.2.1 on localhost.

It looks to me like your bumping into this known issue: http://sourceforge.net/p/phpmyadmin/bugs/4187/

The update goes to cache and therefore teh select * would come from cache versus the select "explicit column" which would pull directly from the DB. I'd imagine the export > drop > re-import process clears the cache with the drop.

Looks like its fixed in 4.1.2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM