Jump to content


Photo

3d table


  • Please log in to reply
2 replies to this topic

#1 archie

archie
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 20 August 2003 - 12:13 AM

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
Domain names are like girls; all the one\'s I like are allready taken...

#2 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 20 August 2003 - 12:26 AM

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 indexid         username1          user12          user2------------------------table 2 - user infouser_id      row      field1               1          4564564641               2          897897897

etc etc

#3 archie

archie
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 21 August 2003 - 03:50 PM

Cheers akitchin. good advice
Domain names are like girls; all the one\'s I like are allready taken...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users