7

When using the PDO::debugDumpParams, is there a maximum number of characters the output will show for the "selected" query? After approx 500 characters the query is being ended in the middle of the query, while when outputting the prepare $query variable, the full query is being shown.

Also when removing certain parts of the query, it still show a part and not the full query (what I saw first, minus the part I remove, added a new piece which didn't show before).

Is this a know issue or is this something I can overwrite with the settings?

With kind regards

4

1 回答 1

0

使用以下脚本,我已经能够$pdoStmt->debugDumpParams()写出 4000 多个字符。您遇到的 500 的限制似乎不是功能本身的硬限制。也许您编写查询的一项操作限制为 500 个字符?

$db = new PDO('mysql:dbname=test;host=localhost', 'user', 'pass');

$stmt = $db->prepare('SELECT ' . implode(', ', array_fill(0, 500, "'test'")));

$stmt->debugDumpParams();

(这是在 PHP 5.2.11 上。)

于 2013-08-12T21:23:19.427 回答