alfonso
Posts: 121
|
| Posted: 04/05/2010, 5:02 AM |
|
Hi!
I´ve got a problem that i don´t know how to resolve it. I´ve got a news system and i need to attach many files to the new. I mean, i insert a new in the web, using a record form and then i need to attach 2,3, 9 (it depends) files to the new. I´ve got a table with the relationship between news and docs. In one hand i´ve got in the table the new and in the other hand i´ve got the files, how can i do for the user can select some files to attach to the new?
my idea is that the user can view in a grid the files and he can do a multiple select and then can press "associate" button to attach files to the new...
any idea?? thankss
|
 |
 |
Waspman
Posts: 948
|
| Posted: 04/05/2010, 5:15 AM |
|
Arrh! One to many relationships...Your journey starts here
_________________
http://www.waspmedia.co.uk |
 |
 |
melvyn
Posts: 333
|
| Posted: 04/05/2010, 9:46 AM |
|
Alfonso: Try attaching a fckeditor in your news field. It handles the files by its own way.
_______________
Intenta usar un fckeditor. Con fckeditor se manejan las imagenes por el mismo fck, y lo organiza a su manera, sin intervencion de CCS. Es interesante.
_______________
New = Nuevo
News = Noticia
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com |
 |
 |
Waspman
Posts: 948
|
| Posted: 04/06/2010, 12:45 AM |
|
Definitely one to many - be careful with how CSS example says you should get last ID. This is not good. Create I unique news ID and use that to associate news to file.
FCKeditor doesn't handle uploads that well and you'll probably get lots of duplicates or unwanted files. Also the user would see the files uploaded by others.
T
_________________
http://www.waspmedia.co.uk |
 |
 |
damian
Posts: 838
|
| Posted: 04/06/2010, 5:42 AM |
|
if you absolutely know the max number of files that could be attached you could do it all in one table...
news
news_id
news_title
news_text
author_id
news_date
news_file1
news_file2
news_file3
....
otherwise i would add news_id as a field in my docs table....
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |