As rudy says:
Quote:
|
don't re-invent the wheel
|
However, should you wish to do it you can use a CREATE FUNCTION in MySQL 5+ to take the field name and string and produce a returned result based on whether it exists or not.
I doubt that'll you'll be able to be able to write a better algorithm than already exists. That and you won't be able to use indexes like MySQL's internal procedures will, but by all means give it a go and let us know how you get on.