I have the following data in a column in my database, and I have literally no idea what to do to retrieve a piece of the data that I want:
a:2:{i:1;a:3:{s:8:"property";s:10:"Promo code";s:5:"logic";s:11:"Is equal to";s:5:"value";s:12:"DISCOUNTTIME";}i:2;a:3:{s:8:"property";s:15:"Promo use count";s:5:"logic";s:11:"Is equal to";s:5:"value";s:1:"0";}}
I’m trying to retrieve only DISCOUNTTIME. I can handle the basics like
"SELECT x FROM y WHERE id = z"
but just have no idea how to deal with the way this data is formatted.
Any help?
take a look at php unserialize() – it looks like your string is in that format