PDA

View Full Version : how 2 get the size of attachment from the dbase


87GTR
07-03-2002, 11:34 AM
Im working on hack to limit amount of space per user for attachments. and give them access to their attachments
in their control panel so they can add / change / del
the files they uploaded.

I have had my forum up for around a month and the have 250meg of attachments.

I will pass out my code once its out of alpha.

if anyone can shed some light on getting the size of the attachments it would be a huge step.

87GTR
07-03-2002, 12:17 PM
kewl I figured it out, using MySQL LENGTH() command in my query.

LENGTH(filedata) as 'filesize'

Admin
07-03-2002, 02:41 PM
Yup, that'll give the file's size in bytes. :)