Welcome Guest, Not a member yet? Register   Sign In
Case insensitive login class
#4

[eluser]adamp1[/eluser]
Quote:By default, MySQL searches are not case sensitive. This means that if you search with col_name LIKE 'a%', you get all column values that start with A or a. If you want to make this search case sensitive, make sure that one of the operands has a case sensitive or binary collation. For example, if you are comparing a column and a string that both have the latin1 character set, you can use the COLLATE operator to cause either operand to have the latin1_general_cs or latin1_bin collation. For example:

Code:
col_name COLLATE latin1_general_cs LIKE 'a%'
col_name LIKE 'a%' COLLATE latin1_general_cs
col_name COLLATE latin1_bin LIKE 'a%'
col_name LIKE 'a%' COLLATE latin1_bin

More information can be found here and here

Hope that helps


Messages In This Thread
Case insensitive login class - by El Forum - 01-26-2008, 05:21 AM
Case insensitive login class - by El Forum - 01-26-2008, 05:46 AM
Case insensitive login class - by El Forum - 01-26-2008, 10:48 AM
Case insensitive login class - by El Forum - 01-26-2008, 10:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB