Temporary Tables Not Working in PHPMyAdmin

我只是一个虾纸丫 提交于 2019-12-04 08:00:47

PHPMyAdmin (or rather PHP) closes the database connection after each screen. Thus your temporary tables disappear.

You can put multiple SQL statements in the SQL query box in PHPMyAdmin; this should be executed as one block and thus the temporary table is not deleted.

Mohammad.Amin

Temporary tables are temparar and after use thay Delete. for example ,when insert data into database , first we can insert into temp table and thus when complete transaction , then insert into main table.

EXAMPLE :
//------------------------------------------
CREATE TEMPORARY TABLE TEMP
(
USERNAME VARCHAR(50) NOT NULL,
PASSWORD VARCHAR(50) NOT NULL,
EMAIL varchar(100),
TYPE_USER INT
);
INSERT INTO TEMP VALUES('A','A','A','1');
SELECT * FROM TEMP
//-----------------------------------------
Show A,A,A,1
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!