List:General Discussion« Previous MessageNext Message »
From:Norman Khine Date:August 9 2010 5:33pm
Subject:searching serialized data stored in mysql
View as plain text  
hello, i have a table called checkout, this has a row called products
which has contains a python dictionary data, like

{products: [{productId: 123, productName: APPLE,
            productPrice: 2.34, productUrl:,
productDescription: "nice juicy apples"},
                 {productId: 333, productName: ORANGE,
            productPrice: 4.21, productUrl:,
productDescription: "nice juicy oranges"},

what will be the correct way to make a search on this data, for
example if i want to search for a range of products with a price
between €2 - €4

is this the correct way to store this type of data?


would i have to create a temporary table for each serialized value and
then make my query on this?

˙uʍop ǝpısdn p,uɹnʇ pןɹoʍ ǝɥʇ ǝǝs noʎ 'ʇuǝɯɐן sǝɯıʇ ǝɥʇ puɐ
ǝq s,ʇǝן ʇǝʎ
%>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or
chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] )
searching serialized data stored in mysqlNorman Khine9 Aug
  • Re: searching serialized data stored in mysqlMark Goodge10 Aug