Why is the LIKE operator works differently via PHP and through phpMyAdmin?

0 like 0 dislike
8 views
The query SELECT * FROM tbl1 where text like "%word%" when I run it via php does not return an entry whose text="word".
When you run the query through phpmyadmin - word comes back
The query SELECT * FROM tbl1 where text like "%ord%" works correctly?

What could it be? I suspect that something with encodings, but the query SHOW VARIABLES LIKE 'char%' in both cases returns the same values:
character_set_client=utf8mb4
character_set_connection=utf8mb4
character_set_database=latin1
character_set_filesystem=binary
character_set_results=utf8mb4
character_set_server=latin1
character_set_system=utf8
character_sets_dir=/usr/share/mysql/charsets/
by | 8 views

1 Answer

0 like 0 dislike
perhaps the %w is interpreted as a date.
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
asked May 22, 2019 by Konstantin18ko
0 like 0 dislike
1 answer
asked Apr 13, 2019 by fandorin_official
110,608 questions
257,186 answers
0 comments
33,849 users