mysqli - PHP Mysql - Illegal mix of collations when using CONCAT -


iv'e been trying concat 2 columns table , perform on them

here mysql query:

select * stops concat_ws(name, ' ', desc) '%this%' , concat_ws(name, ' ', desc) '%is%' ,  concat_ws(name, ' ', desc) '%a%'  , concat_ws(name, ' ', desc) '%test%' 

when run via php code or phpmyadmin following error:

illegal mix of collations (utf8_bin,none) ,  (utf8_general_ci,coercible) operation 'like' 

iv'e been checking similar questions topic , saw lot of answers told change collation of database.

i changed database, tables , fields collcation utf8_general_ci

when run same query in navicat works fine.

am missing here?

thanks!

set database , tables -> character utf8

   alter database db character set utf8 collate utf8_general_ci  alter table table convert character set utf8 collate utf8_general_ci 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -