Jump to content

Help with FUNCTION


shank8
 Share

Recommended Posts

I need to create a function that has a VARCHAR as a parameter and checks to see if there is a match of that VARCHAR to a VARCHAR in a table. However, the VARCHAR is a phone number and I am supposed to have my function accept strings like '555-555-5555' and '555.555.5555' and '(555) 555-5555' when the number in the table has the format '5555555555'. Therefore, how can I use REGEXP or some other function or algorithm in mySQL that can handle the extra characters? Is it even possible to use REGEXP in this case? Thank you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...