This is just a quick question, I have a string of binary values, (yes, i mean I have a string that looks like this: '010010110101001000101001000000100101110000000010') 357 characters long that I have to store in a mysql table. Now I have several posibilities for how to store it, and several problems with most of them.
My first choice would be a varchar field because that can be fixed-width, however those have a max length of 255, leaving Text as my shortest field type available.
Another possibility was the pack command, which seems to work, shortening it down to an easy-to-store 45 characters, however that creates other complications. In order to use this method, I need to find some way of at least simulating a unpack('B*',value) from within mysql.
To summerize, is there a pack/unpack command built in to mysql that could compress and de-compress my string, or is there some other method of making that many pieces of data fit into a 255 char space?
Sorry if this isn't as clear as it could be, if I need to clarify something, feel free to say so.
Thanks!
My code doesn't have bugs, it just develops random features.
Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)
In reply to MySQL pack? by Flame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |