thomas1988
thomas1988

Reputation: 55

Searching for numbers in multiple forms during database query

I'd like the user to be able to search for values containing numbers using the numeral, written or roman numeral form. I've found a guide on converting roman numerals to numerals and vice-versa, but this could potentially lead to problems elsewhere in the search as certain records on the database use different forms.

For example, I'd like 'Star Wars: Episode 5', 'Star Wars: Episode five' and 'Star Wars: Episode V' all to be searchable and result in the database entry for 'Star Wars: Episode 5' being returned. I don't want the search to simply swap out the word/numeral/number and only conduct a single search as this would mean that a database entry like 'V for Vendetta' would be unobtainable.

Ideally, the method would be compatible with the 'like' function as that is what my search currently uses.

Upvotes: 1

Views: 71

Answers (0)

Related Questions