error with national letters
error with national letters
zhirkov.ivan
Posts: 3Questions: 2Answers: 0
if in table have DATETIME column
and iam try filtering by national (no english) letters
next i see error in any examples at Datatables:
"DataTables warning: table id=example - An SQL error occurred: SQLSTATE[HY000]: General error: 1271 Illegal mix of collations for operation 'like'"
but if iam writing directly SQL query in PHP - i never see this error in any national chars
This discussion has been closed.
Answers
This is not a DataTables error. You need to examine your database's tables for consistency of collation. You are probably querying two tables which do not have the same collation.
iam querying one table from example
iam make this table in MySQL
scheme db have a default collation utf8mb4_general_ci
table i am making from example mysql.sql and using example code from http://datatables.net/examples/server_side/simple.html
i think it really problem in collation but now i am not understand
You might need to do something like
SET NAMES 'utf8';
immediately after the database connection has been setup to ensure everything is consistent.Allan
First of all, thanks a lot for this amazing plugin!
Sorry for my poor English, but maybe it will help.
I had same issue, and searching for any help I found this topic: http://stackoverflow.com/questions/10379299/operator-like-field-type-timestamp-and-cyrillic-mysql-bug
Looks like there is MySQL bug, and you should try to convert your columns to UTF-8 string in ssp.class.php (filter function):
Maybe it's not best solution, but i solve my problem.
But I have another problem. Using this, I can't search date. When I try, I got "No matching records found".