| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | August 11 2002 5:58pm |
| Subject: | Re: Need reversible encryption as string | ||
| View as plain text | |||
At 19:51 +0200 8/11/02, Benjamin Pflugmann wrote: >Hi. > >On Sun 2002-08-11 at 12:07:47 -0500, paul@stripped wrote: >> At 9:25 -0700 8/11/02, Michael Collins wrote: >[...] >> >SELECT * FROM MYDB >> >WHERE EmailAddress=$EmailEntered AND >> >DECODE(LoginPassword,'MySalt')=$PasswordEntered >> >> If you write the query like that, yes, it will use a complete scan. > >I beg to differ. If there is an index on EmailAddress it will be used >and only all entries with the same email address (which should be one >or only one) will be scanned. You're right. I was speaking only with respect to evaluation of the condition on LoginPassword. > >> But you could also use >> >> ... AND LoginPassword = ENCODE($PasswordEntered,'MySalt') > >But that's a good idea anyhow. You're right there, too. :-) > >Bye, > > Benjamin. > >-- >benjamin-mysql@stripped
| Thread | ||
|---|---|---|
| • Need reversible encryption as string | Michael Collins | 11 Aug |
| • Re: Need reversible encryption as string | Mike Hall | 11 Aug |
| • Re: Need reversible encryption as string | Michael Collins | 11 Aug |
| • Re: [OT] assigning new passwords (was: Need reversible encryption as string) | Benjamin Pflugmann | 11 Aug |
| • Re: Need reversible encryption as string | Paul DuBois | 11 Aug |
| • Re: Need reversible encryption as string | Benjamin Pflugmann | 11 Aug |
| • Re: Need reversible encryption as string | Paul DuBois | 11 Aug |
| • Re: [OT] assigning new passwords (was: Need reversible encryption as string) | Mike Hall | 11 Aug |
| • Re: [OT] assigning new passwords (was: Need reversible encryptionas string) | Joe Shear | 12 Aug |
| • Re: Need reversible encryption as string | Michael Collins | 11 Aug |
