I have a login field in the db. when I give find_by_login(‘Abc’). And
there is no login as ‘Abc’ but there is ‘abc’, then it returns that it
exists. Shouldn’t this be case sensitive by default? If not then how can
I do a case sensitive search?
I have a login field in the db. when I give find_by_login(‘Abc’). And
there is no login as ‘Abc’ but there is ‘abc’, then it returns that it
exists. Shouldn’t this be case sensitive by default? If not then how can
I do a case sensitive search?
So, how do I get around it when using mysql & find_by?
If you want to use find_by you’ll need to alter your table. Otherwise
you can write some custom SQL to do the select. Read the page I linked
to in my previous post.
So, how do I get around it when using mysql & find_by?
Michael W. wrote:
Rm Rm wrote:
Hello,
I have a login field in the db. when I give find_by_login(‘Abc’). And
there is no login as ‘Abc’ but there is ‘abc’, then it returns that it
exists. Shouldn’t this be case sensitive by default? If not then how can
I do a case sensitive search?
So, how do I get around it when using mysql & find_by?
If you want to use find_by you’ll need to alter your table. Otherwise
you can write some custom SQL to do the select. Read the page I linked
to in my previous post.
–
Michael W.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.