I have a strange question. I have a normal text field (called plantname) in a table (Plants) that has plant names like this:
Delphinium * Black Knight
Delphinium * Red Flower 3
Delphinium * Blue Orchid
etc.
I obviously can select the first one with:
select * from Plants where plantname = 'Delphinium * Black Knight'
Is it possible to get mysql to select on plantname but preprocess the text and apply a regex to it first? what I'm trying to do is make the above select also work like this:
select * from Plants where plantname = 'delphinium-black-knight'
So I would like mysql to pretend the only characters in plantname are A-Za-z0-9 and the spaces are a dash. I know I could just recreate a new field and copy the names over in the delphinium-black-knight format, but I'm trying not too.
Any got a clue?
Thanks.