很久以前,我創建了包含每個用戶的數據庫與表的應用程序,每個表只有1行。所以我有像user1,user2,...,user2800這樣的表格。現在我知道這是一個可怕的想法,所以我試圖爲每個用戶創建一張大桌子。我需要創建表從更多相同的表中創建一個大表
CREATE TABLE `users` (`user_id`, `col1`, `col2`, ...)
從象表:
TABLE `user###` (`row_id`, `col1`, `col2`, ...)
其中###是用戶ID。
有沒有什麼好的方法如何做到這一點?
Thse倍數用戶表不具有相同的字段? – Veve
@Veve每個表格都有相同的字段 –
您可以使用類似PHP的任務來完成此任務嗎? –