A
A
Aricus2020-04-15 18:23:04
PHP
Aricus, 2020-04-15 18:23:04

How to get MySQL query longer than 300 characters via set profiling?

I'm trying to get a PDO request with substituted parameters:

set profiling=1;
...
show profiles;

If in more detail:
(new DB)->do('set profiling=1');
$result = (new DB);
$result->params = $this->params;
$result->addText = $this->addText;
$result->in = $this->in;
$result->save = $this->save;
$result->$type($reqText);
$requests = (new DB)->many('show profiles');
$this->setError('Запрос:<br>'.array_pop($requests)['Query']);

This works, however, if the query is long, only the first 300 characters are printed.
Here it is written that it is asked
#define MAX_QUERY_LENGTH 300U

But I still don't understand where and how it can be changed? Can't google. If it matters, access to the database through phpMyAdmin, in the role of the server - XAMPP.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question