-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Illegal mix of collations for operation 'like' while searching #38
Comments
there is an optional second parameter for generate() to accept custom charsets. see here: |
Sure, default is utf-8 and I generate it utf-8. It is stored in db table as utf-8 all. That's why I am stacked and don't know how to fix it. echo $this->datatables->generate('json','utf-8'); I think, the problem is how it posts. For example if I type 'ş', error must be query must be LIKE '%ş%', not 'LIKE '%Ä°%'. |
use ISO-8859-1 |
cryogenix, it makes no different. Forcing to use something is not quite a solution indeed. when using dataTables without Ignited-Tables, it works. So problem is handling POST data. |
Yahya Bey merhaba, Saygılarımla, |
n1Crack, yanıt için teşekkürler.. |
Yusuf Bey, merhaba, $this->writelog($this->ci->db->last_query());
if($output == 'json')
{ ... Problem biraz daha mysql tarafında olmalı. Çünkü türkçe karakter ile arama yaptığınız zaman son çalışan sorgu yenilenmiyor. Yani bu yazının başlığına dönüp orada takılıyoruz. get_filtering() if($sWhere != '')
$this->ci->db->where('(' . $sWhere . ' ) COLLATE utf8_bin ');
// ya da $this->ci->db->where('(' . $sWhere . ' COLLATE utf8_bin ) '); da bir değişiklik yaratmadı. "Illegal mix of collations for operation 'like'" kısmında yatıyor çözüm. Veritabanını da iki kez kontrol ettim, tüm tablolar ve text alanlarında utf8 collate var, tablo charset'leri de utf8. Umarım yardımı olur. |
Yukarıdaki sorunun id ve datetime alanları olduğuna dair yazı. Benim örneğime uyarlayarak test ettim, sonuç id alanları problem yaratmıyor, ancak DATETIME alanı eklendiği anda "illegal collation" uyarısı çıkıyor. Sanıyorum işin Ignited-Datatables ile bir ilgisi yok, dolayısıyla teşekkür ediyor ve konuyu kapatıyorum. |
I have successfully implemented Ignited-Datatables, works like a charm, thank you. However, while searching with database when typing "non-latin" characters like "İ,ş,ğ,.."
Details are:
'%Ä°%' part changes according to the non-latin character you typed.
Any idea for solving this?
The text was updated successfully, but these errors were encountered: