CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Attach multiple files to a new

Print topic Send  topic

Author Message
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
View profile  Send private message
Waspman

Posts: 948
Posted: 04/05/2010, 5:15 AM

Arrh! One to many relationships...Your journey starts here :-D
_________________
http://www.waspmedia.co.uk
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
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.... :)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.