mirod's solution is correct. However, you may wish to rethink your database design. Either adopt a multi-value database which ignores the first normal form and allows multi-value fields (like UniData or UniVerse), or extract the multiple values out to another table and have a reference to that table in your original table.
Violating the first normal form in a database seriously interferes with maintenance and scalability. As the database grows, new programmers (and old ones) need to be aware of the multi-value fields and create new code to deal with them. If they forget, or if the new code is buggy, you can easily wind up with corrupted data.
I realize that switching databases is probably not a viable option, so I'd recommend creating a new table.
Just a thought... accept or disregard as you will.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just go the the link and check out our stats. | [reply] |
| [reply] [d/l] |
< satire>
Hi!!!!! I have data on several 1000s multi-generation family trees stored in a MySQL database.
To faciltate a simple schema, I opted for a pretty novel representation:
I store each tree *graphically* in gif files, concatentate
all the gifs into one big binary object, and then store the huge resulting
data in a one row, one field table. It is working pretty well so far,
but I am seeking the wisdom of the Monks on how to
update the structure when a couple with children *divorce* then *remarry* other
people. (No modules, please: prefer to code
everything myself.) Thanks in advance!!!!!
</satire>
Sigh. I'm not bashing the anonymous monk who posted; rather,
expressing my amazement at the staggering ways folks
(mis)use databases.
| [reply] |
<satire>
Your problem is the use of the GIF format for your data. If you really want to move the cutting edge of image-based storage of text-data, I suggest
PNG
</satire>
| [reply] |
| [reply] |