Multiple Select

Results 1 to 2 of 2

Thread: Multiple Select

  1. #1
    Join Date
    Dec 1969

    Default Multiple Select

    Hi<BR><BR>I am developing a documents database and building a web access to this database over my internal network. It&#039;s just the beginning, but I have the following problem : I have a documents table and a categories table, but, as far as I know, some documents may fit in more than one category.<BR>How can I organize my documents table so that 1 document with 1 ID would be registered in multiple categories. The only way I can imagine is creating more than one category field, let&#039;s say 3 and select a category in each, but this alternative seems a bit "out-of-date" to me.<BR><BR>Could anyone tell me if there is another way to do it ?

  2. #2
    Join Date
    Dec 1969

    Default RE: Multiple Select

    Well I can think of two solutions right now:<BR><BR>1. Put all the categories in an text field like this 1-3-5-6 then you could use stringfunctions (like split, instr etc) to work with the categories.<BR><BR>2. Make an extra table with the categorieID and the documentID like this:<BR><BR>CatID BookID<BR>1 2<BR>1 3<BR>2 2<BR>3 5<BR>3 2<BR><BR>I would go for the second solution, it&#039;s the most flexible solution IMHO<BR><BR>Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts