Ross Hulford wrote:
> I have an address stored as a serialized array
> address = "my street";
> address = "Edinburgh";
> address = "Scotland";
> This is what I have. I want if it is possible to extract all the UNIQUE
> towns from my database.
> This is what the on of the entires looks like in my database.
You are missing the point of a database by denormalizing your data in
this way, and making it very hard to work with. You should read up on
first normal form and re-normalize your data. Not because I'm a MySQL
fan, but one of the most understandable explanations I've seen of this
is actually on the MySQL site:
Yes it's possible with some SUBSTRING() and LOCATE() or
SUBSTRING_INDEX() calls, but it's not something I can stare at and tell
you how to do in 3 seconds, so I'll just refer you to the manual: