A query returned from the profiler or query object will have placeholders if you use them.
To see the exact query made by mysql, you can use the general query log.
This list will list all the requests that have been executed since its inclusion. Remember to disable this once you have collected your sample. On the active server; this journal can fill up very quickly.
From a MySQL terminal or query tool such as MySQL Workbench, run:
SET GLOBAL log_output = 'table'; SET GLOBAL general_log = 1;
then run your query. The results are stored in the table "mysql.general_log".
SELECT * FROM mysql.general_log
To disable the query log:
SET GLOBAL general_log = 0;
To make sure it is turned off:
SHOW VARIABLES LIKE 'general%';
This helped me find a query in which the placeholder was not replaced with Zend DB. I can not see this with the profiler.
txyoji Jun 21 '19 at 20:30 2019-06-21 20:30
source share