As Jerry mentioned, you can use temporary tables. Temp tables are unique to the login session, so each usr logged in could create a table called "data" with conflict. But temp tables are just that, once the session is done, the temp table is dropped.

If you need persistant tables, which I think is an incredibly bad idea in your case, you can name the table based on the user name and just alias the table name in query:
select * from usernametable as data;

I think persistent tables is a very bad idea because you can very easily and quickly create thousands of tables that would eventually overwhelm mysql. Not to mentioned it's a bad idea to give create table privileges out to everyone.

Another alternative is to create a single table called "data" with a field called "userid". Then each use owns a certain set of records in that table that you can select on. You would need to setup something to periodically clean out old entries. Implementing this with merge tables would ease the cleanup process.

----- Original Message ----- From: "JugLugs" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Wednesday, May 30, 2007 2:27 PM
Subject: RE: True multi user?



There is a master document on a server which references a table called 'data'
within database.

I need users to query many tables and produce a data source called 'data'
which the document can then reference.

The problem is, that this 'data' table could easily get overwritten by
another user.

Creating a number of similar documents (one for each user) is not really
practical as there may be an infinite number of users.
Also this is a web based application and therefore I would have difficulty
in writing a datasource (csv or something) to the users hard drive without
user intervention.

Regards

JugLugs


--
View this message in context: 
http://www.nabble.com/True-multi-user--tf3841867.html#a10879747
Sent from the MySQL - General mailing list archive at Nabble.com.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to