This topic is locked
[SOLVED]

 how add many field/ same field

2/11/2011 11:48:04 AM
PHPRunner General questions
T
tedwilder author

Hello,

I would like to create a small personal database for all my outgoing and ingoing mail.

So I create a table for contacts, one for document, one for mail.

So in the mail table I add a new mail that I wrote : it ask me the contact id , and the document id ( the document is a scanned pdf copy of the document I sent). my problem is : sometimes I fill big files : so I sent 1 letter and like 10 documents. So : how can I add a unknown field.

example : If I put 1 field "attached_document" in my "mail table", it's not enough , because sometimes I have 10 attached documents. But Creating 10 fixed fields in table "mail" is big and I most of the time dont need 10 "attached_document" field.

how is it possible to have like for instance in this forum : when you need to attached a file you browse 1 file, if you need more you clik on " add" and it create another field and so you can add another file and so on.

in a word : how is it possible to record data in a database with "dynamic" fields : I think maybe a field that contains concatened data ( ex: 5885;654445;89987;24654; ) and then in the list view a php programm that would expand this string and show a link to each document id.

does this exist in phprunner?

thank you.

Sergey Kornilov admin 2/11/2011

I would suggest to link Mail and Document tables as master-details. This way you can add as many attachments as you need to storing each attachment as a separate record in Document table.

T
tedwilder author 2/11/2011



I would suggest to link Mail and Document tables as master-details. This way you can add as many attachments as you need to storing each attachment as a separate record in Document table.


yes great idea ! shame on me not to have think about that <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=56426&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> thanks a lot