temporary tables / mysql

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
kevin_zer0
Forum Newbie
Posts: 7
Joined: Sun May 10, 2009 11:00 pm
Contact:

temporary tables / mysql

Post by kevin_zer0 »

hello there 8O
i have a question about temporary tables in mysql
i want to know if i have a query in my php code that makes mysql create a temporary table each time , what happens if two or three (or more!) users execute that code simultaneously ? i mean what happens to my mysql tables ? will there be an error saying 'table name already exist' ?
please help
thank you :mrgreen:
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: temporary tables / mysql

Post by Darhazer »

No, there won't be such error. The temporary table will exist only for the current connection, so another connection can use the same name. Think like each connection is a separate namespace
User avatar
kevin_zer0
Forum Newbie
Posts: 7
Joined: Sun May 10, 2009 11:00 pm
Contact:

Re: temporary tables / mysql

Post by kevin_zer0 »

thank you dear 'Darhazer' :) you solved my problem
Post Reply