Sql '=' statement returns unexpected result

here is my request

SELECT * 
FROM  `tx_branddata_info` 
WHERE  `brand_title` =  'BOEHLER'
LIMIT 0 , 30

he returns

enter image description here

but the expected result is the first. Anyone has a solution other than changing the sort.

+4
source share
3 answers

It seems to brand_titlecomply with latin1_german2_ci rules ( http://dev.mysql.com/doc/refman/5.7/en/charset-we-sets.html ):

Ä = AE
Ö = OE
Ü = UE
ß = ss

Check the character set of the field and change it if you obviously can, imho, utf8mb4.

Hope this helps.

+2
source
SELECT * 
FROM  `tx_branddata_info` 
WHERE  BINARY  `brand_title` = 'BOEHLER'
LIMIT 0 , 30
+1
source

- latin1_german2_ci. :

Ä = AE
Ö = OE
Ü = UE
ß = ss

,

SELECT * 
FROM  `tx_branddata_info` 
WHERE  `brand_title` LIKE  'BOEHLER'
LIMIT 0 , 30

, 'Like' .

+1

Source: https://habr.com/ru/post/1648608/


All Articles