Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 361
Ranveer Avatar asked Dec 19 '13 11:12

Ranveer


People also ask

How do I show all columns in phpMyAdmin?

Marc Delisle points out that the column may be hidden within phpMyAdmin; in the Browse tab look to the left of the column headers, there's a T with two arrows -- to the right of that is a small dropdown arrow. Make sure all your columns are selected there.

How do I update a column in phpMyAdmin?

Click on the table you wish to modify. Inside the table, you will see a list of columns. To the right of the column name, you will see a link called "Change" under the Actions. Click on the Change link for the column you wish to modify.


1 Answers

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

like image 70
Matt617 Avatar answered Oct 21 '22 23:10

Matt617