Jump to content

Multi file Upload output in one row


Darkstar0078

Recommended Posts

Hello all together,

 

I need some help with my Project.

 

I have made a Ticket System with PHP and MSSQL. When a customer has opened a Ticket, he has the possibility to 

chat with us. In this chat I want to have a Multi File Upload. Until here I have no Problem, the Chat is running and a single file upload also.

 

What I have made for the Multi file upload:

 

Table Chat:  (including the single File upload)

ChatID int Unchecked
TickID int Checked
message varchar(MAX) Checked
author int Checked
added nvarchar(50) Checked
uploadfile varchar(MAX) Checked
imgsize int Checked
active int Checked
 

For the Multi Upload I made a upload table:

 

DatID int Unchecked
uploadfile varchar(MAX) Checked
imgsize int Checked
RefTickID int Checked
RefChatID int Checked
filename nvarchar(MAX) Checked
active int Checked
 

I Combine this tables in a view.

 

The result should be something like this:

 

USERNAME DATE "MESSAGE" 'Attachment1','Attachment2','Attachment3'

 

What I actually get:

 

 

USERNAME DATE "MESSAGE" 'Attachment1'

USERNAME DATE "MESSAGE" 'Attachment2'

USERNAME DATE "MESSAGE" 'Attachment3'

 

How can I fix this Problem? 

 

I would be very grateful for a saving solution.

 

Thank you very much

 

DakrStar ;-)

 

 

Link to comment
Share on other sites

That's how it should be. Or rather you should be getting the username, date, and message in one query and the set of attachments in a second query.

 

If you want to display the data in a table horizontally then display the data in a table horizontally. Your query's results don't have to be, and rarely ever are, the final version.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.