Tedd,

SELECT OCTET_LENGTH(blob_field)/1024 FROM tablename will give you the sizes in KBs. Watch out for NULLs though - that is - if the BLOB field is NULL.

Best,

Dev

On 4/4/2011 9:12 PM, tedd wrote:
Hi:

I have a table that has BLOB fields.

I want to determine programmatically (hopefully via a SQL query) what's the size of data contained in these BLOB fields -- how do I do that?

For example, I have a record that contains an image in a BLOB field and phpMyAdmin shows that the field is holding 11,3KB of data. Is there a way to determine that size besides inspecting the record via phpMyAdmin?

Thanks,

tedd



_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to