archie Posted August 20, 2003 Share Posted August 20, 2003 Is it possible in Mysql to create a 3 dimensional table; ie one which has x fields, y rows, and z height? This may sound a little odd, but what I want is a table with 51 fields and 50 rows for EACH of my users. Each cell in this table would contain an 11 digit intiger, which would be a reference to another table. At the moment, I am thinking I will have to create a table for each user, so I might end up with thousands of similar (in structure, not in content) tables. Is there a more efficient way of doing this, so I end up with one table which can accomodate all this data? Thanks, Archie Quote Link to comment Share on other sites More sharing options...
akitchin Posted August 20, 2003 Share Posted August 20, 2003 why not make an index table, giving each user a specific id - then on another table where you want 50 rows and 51 fields per user, make one column user_id which can have 50 rows with the id 1, for user 1. not sure if i\'ve been clear enough. here\'s a bit of a diagram: table 1 - user index id username 1 user1 2 user2 ------------------------ table 2 - user info user_id row field 1 1 456456464 1 2 897897897 etc etc Quote Link to comment Share on other sites More sharing options...
archie Posted August 21, 2003 Author Share Posted August 21, 2003 Cheers akitchin. good advice Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.