Hello everyone.
When you run the query, the following error occurs.
Any tips?
Thank you
Link to erro http://laurenceaa.store/sql/erro_sql.png[file=http://laurenceaa.store/sql/erro_sql.png]erro_sql.png[/file]
Hi laurenceaa,
My guess is that this might be some difference between MariaDB and MySQL? I also notice that in the image there appears to be a ' after the %m and some double quotes in the string - but they are hard to make out in the image.
Is this a query you have written or something built in to CCv6?
Bob
I built the query. I run it manually in phpmyadmin and get the satisfactory result.
The WHERE server clause to alert about the client's birthday.
What I noticed is that CCv6 makes character substitutions generating the error. I want to know how to make CCv6 not make these replacements.
FUNCTIONAL SQL
SELECT COUNT(`model_cliente`.`id`) AS `model_cliente.count` FROM `o493f_tpm_cliente` AS `model_cliente` WHERE DATE_FORMAT(`model_cliente`.`dt_nascimento`, '%m/%d') = DATE_FORMAT(CURDATE()-1, '%m/%d')
SQL IN ERROR
SELECT COUNT(`model_cliente`.`id`) AS `model_cliente.count` FROM `o493f_tpm_cliente` AS `model_cliente` WHERE `DATE_FORMAT(`model_cliente`.`dt_nascimento`, '%m` %D') = DATE_FORMAT(CURDATE()-1, '%M/%D') ''
I had same issue, if you disable "Paging for multiple results", apply and test , if works you can after activate again paginator
may be a bug but only I detected when I used DATE_FORMAT(created , '%Y-%m-%d') in condition