PDA

View Full Version : ascii, binaries and serialization


Lionel
08 Mar 2007, 20:18
I've got that table with those columns

mainid (int3)
zone1 varchar(255)
item1 int(3)
pic1 (mediumblob)

there are 64 zones all with same info (zone2,item2,pic2 and so on) and I am trying to avoid to create 3x64 additional columns

I need to do do a left join for each item* to get the item name and description from another table.

My assumption is that you cannot mix and match ascii and binaries in same serialized column

My approach is to

1-leave first table as is and serialize all zone and item (64 of them)

2-create a second table for pic with
mainid
pic

and serialize all pictures in there

then

do a query_first where mainid=xx
foreach zone I run a query to get the item name and description from the unserialized item, then do a second query to get all the unserialized images

Is there a better way of doing this?