We help IT Professionals succeed at work.
Get Started

Select multiple blobs in one coloum one record

tonelm54
tonelm54 asked
on
218 Views
Last Modified: 2012-06-21
Good evening,
Ive been dealing with blobs over the past few days, and experienced several issues with my application dealing with them. I have solved it by splitting a blob file up over multiple records, so instead of having one massive blob in a record, I now have a table:-
CREATE TABLE `fileBlob` (
`fileID` BIGINT NOT NULL ,
`part` INT NOT NULL ,
`blob` TINYBLOB NOT NULL 
)

Open in new window


Which works great for uploading files into the table, but messy when downloading. Currently I call the statment and work through each row appending the blob output:-
SELECT * 
FROM `fileBlob` 
WHERE `fileID` =27
ORDER BY `part` ASC 

Open in new window


Is it possible to group all the blob data together ordered by `part` from a `fileID`, so something like:-
SELECT GROUP_CONCAT(`blob`) as blobData 
FROM fileblob
WHERE `fileID` =27

Open in new window

However the GROUP_CONCAT would obviously have to be ordered, and I dont know how to tell it to only dislay the blob data.

Any help would be appriciated.

Thank you
Comment
Watch Question
Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009
Commented:
This problem has been solved!
Unlock 2 Answers and 3 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE