0

I have a list page where I filter some data and show results, using the Symfony framework. When I put special characters on these filters, for example ì, I get the following error:

An exception occurred while executing 'SELECT count(DISTINCT c0_.id) AS sclr_0 FROM campaigns c0_ WHERE c0_.title LIKE '%ì%'':

SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'like'

What does this error mean?

DaveyDaveDave
  • 9,821
  • 11
  • 64
  • 77
  • It then tells you exactly. `Illegal mix of collations` – Gerhard Nov 27 '17 at 13:44
  • Welcome to StackOverflow! I've attempted to edit your question to more specifically describe the problem that you're having, and have edited the title to include the specific error message. Hopefully I haven't changed the meaning of your post - feel free to edit it further if I have got anything wrong. – DaveyDaveDave Nov 27 '17 at 15:47

1 Answers1

0

Doctrine does not support count function till now.

take a look at Count Rows in Doctrine QueryBuilder and Count of rows in Doctrine 2

habibun
  • 1,552
  • 2
  • 14
  • 29