Log in

View Full Version : Setting pixel & file size queries...


Chris M
09-14-2002, 09:55 AM
With my Attachments per Forum Hack, Smoothie asked for the ability to set sizes per forum...

I have got these queries to run to test it :

ALTER TABLE `forum` ADD `forumattachsize` MEDIUMBLOB NOT NULL
ALTER TABLE `forum` ADD `forummaxwidth` BLOB NOT NULL
ALTER TABLE `forum` ADD `forummaxheight` BLOB NOT NULL

The "forumattachsize" is the size in bytes...
The "forummaxwidth" is the maximum width of the image in pixels...
The "forummaxheight" is the maximum height of the image in pixels...

Are those queries correct, and if not, what are the correct ones?

Satan

futureal
09-14-2002, 04:19 PM
I don't think you'd want to use a blob in these cases; blob stores the data in binary, so is suitable for filedata such as the actually image data, for example.

I would use something like:


ALTER TABLE `forum` ADD `forumattachsize` int(11) NOT NULL
ALTER TABLE `forum` ADD `forummaxwidth` int(11) NOT NULL
ALTER TABLE `forum` ADD `forummaxheight` int(11) NOT NULL


Although you could change the size of the fields as necessary.

Chris M
09-14-2002, 06:02 PM
Thanks:)

Satan