tonelm54
asked on
Select multiple blobs in one coloum one record
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:-
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:-
Is it possible to group all the blob data together ordered by `part` from a `fileID`, so something like:-
Any help would be appriciated.
Thank you
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
)
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
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
If group_concat has a size limit, I dont see any other way of doing apart from looping and appending!