undo creating a view on a table in MySQL with phpMyAdmin

hi there,
while experimenting wth views in phpmyadmin, i created on a table.

i now cant browse the data in that table through phpmyadmin or manually add data through phpmyadmin.

how can i undo this, or convert it back to a normal table.

the site that uses this database and table is still running normally.

thanks!
LVL 1
alexanderfotiAsked:
Who is Participating?
 
ncooCommented:
Run each query one at a time in PHPMyAdmin.

YOUR_TABLE_TEMP_NAME = any temporary table name

YOUR_VIEW_NAME = view

YOUR_TABLE_NAME = table name

YOUR_VIEW_NAME and YOUR_TABLE_NAME will be the same values.
CREATE TABLE `YOUR_TABLE_TEMP_NAME` SELECT `YOUR_VIEW_NAME`.* FROM `YOUR_VIEW_NAME`;"

DROP VIEW `YOUR_VIEW_NAME`;

RENAME TABLE `YOUR_TABLE_TEMP_NAME` TO `YOUR_TABLE_NAME` ;

Open in new window

0
 
alexanderfotiAuthor Commented:
brilliant, thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.