Are temporary tables in a global MySQL PDO connection within PHP shared? [duplicate]

No, a temp table is limited to the scope of your database connection. You can use the temp table in subsequent calls to the procedure during the same database connection, but other connections cannot access it. They can create a table by the same name, but each temp table will be independent. Temp tables go away when you close your connection.


Temporary table is visible only for current session.

So if you have several simultaneuous sessions - each one will have its own independent temporary table with the same name.

Documentation: http://dev.mysql.com/doc/refman/5.1/en/create-table.html, ctrl+f for "You can use the TEMPORARY"