Nodral Posted March 22, 2011 Share Posted March 22, 2011 Here's a simple question which will save me hours of Googling. When User A creates a temporary table which User B can interact with, When does the temporary table get dropped? Is it:- a) When User A chooses to drop it or when he no longer interacts with it (if so, what is the timeframe on this) b) When User A AND User B no longer interact with the table (if so, what is the timeframe on this) Basically I need to know how the 'ownership' of a temporary table works. Cheers Guys Link to comment https://forums.phpfreaks.com/topic/231392-temporary-tables/ Share on other sites More sharing options...
The Little Guy Posted March 22, 2011 Share Posted March 22, 2011 The user that connects to the database is the only one who can use the current temporary table, when the connection is lost, the table is gone. Link to comment https://forums.phpfreaks.com/topic/231392-temporary-tables/#findComment-1190888 Share on other sites More sharing options...
Nodral Posted March 22, 2011 Author Share Posted March 22, 2011 So if User A connect to the DB and creates a Temp Table, can User B then connect to DB and view that Temp Table until User A disconnects? Sorry if I sound a bit thick on this!! Link to comment https://forums.phpfreaks.com/topic/231392-temporary-tables/#findComment-1190890 Share on other sites More sharing options...
The Little Guy Posted March 22, 2011 Share Posted March 22, 2011 Nope, A can not see B and vis versa. Link to comment https://forums.phpfreaks.com/topic/231392-temporary-tables/#findComment-1190891 Share on other sites More sharing options...
Nodral Posted March 22, 2011 Author Share Posted March 22, 2011 Hmmmm I'm trying to develop a chat application for an internal site. Looks like it'll have to be permanent tables then. Is there a way I can 'time-out' a user and then drop the table after say an hour? Sorry, again, very new to MySQL Link to comment https://forums.phpfreaks.com/topic/231392-temporary-tables/#findComment-1190892 Share on other sites More sharing options...
The Little Guy Posted March 22, 2011 Share Posted March 22, 2011 You will want to create a cron job for that, that runs every 10 - 15 minutes. Link to comment https://forums.phpfreaks.com/topic/231392-temporary-tables/#findComment-1190905 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.