How would I go about returning the current length of a blob field, in a specific row, in bytes?
Any way to accomplish this via straight SQL?
| SitePoint Sponsor |
How would I go about returning the current length of a blob field, in a specific row, in bytes?
Any way to accomplish this via straight SQL?
My name is Steve, and I'm a super-villian.




You could use 'crooked' SQL and do it in php
Then again, that wouldn't be portable. But who cares? You would never need to port it, anyway.![]()
Ryan
I was about to ask what implementation supported "crooked" SQL, then reread my first post....
But really, I mean like, I always search google before asking *any*thing, but I can't find this anywhere! Yet PHPMyAdmin does this without thinking... I was going to look through the source code to try to find it, though I don't know which module to start it
Cheers!!
My name is Steve, and I'm a super-villian.
phpMyAdmin does it with SHOW TABLE STATUS FROM database_name; but this shows per database status. So it doesn't count each row and add up...
Can't you do it with SELECT LENGHT(blob_field) FROM table_name WHERE id = 1?
I can.![]()
You're kidding me, right?
The keyword was "Length"!!!!!!!
Arg, after hours of searching "Size", "Blob size" "mysql column size".......arghh
I even looked under misc. functions, and didn't see length....
Thanks!
My name is Steve, and I'm a super-villian.
Bookmarks