MySQL Forums
Forum List  »  General

Re: How to force a varchar number into a string?
Posted by: Eustaquio Habichuela
Date: February 14, 2015 10:22AM

Rick James Wrote:
-------------------------------------------------------
>
> mysql> SELECT 'abcd' RLIKE '[[:digit:]]', 'ab3cd'
> RLIKE '[[:digit:]]';
> +----------------------------+--------------------
> ---------+
> | 'abcd' RLIKE '[[:digit:]]' | 'ab3cd' RLIKE
> '[[:digit:]]' |
> +----------------------------+--------------------
> ---------+
> |                          0 |                    
>       1 |
> +----------------------------+--------------------
> ---------+
>
> 0 means FALSE, 1 means TRUE

Hello Rick,

First of all thank you very much for your help.

I'm trying to use RLIKE to force the user to enter a digit but I cannot. For what I see it counts the numbers in it and gives you the result.

Any ideas on how I could use it to force a user to enter a digit?

At the moment the way to use this function is:

select login ('user','newpassword', 'newpassword','oldpassword');

At the moment, the new password will need to be longer than 6 digits and needs to be repite twice and correctly in order to be accepted and start the update.

What I want is to add the condition that requires to be enlist one digit on the new password in order to be accepted and start the update.

Thank you very much!

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.