PDO :: debugDumpParams的输出是否有最大值? [英] Is there a maximum to the output of PDO::debugDumpParams?

查看:39
本文介绍了PDO :: debugDumpParams的输出是否有最大值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用PDO :: debugDumpParams时,对于选定"查询,输出中将显示最大字符数吗?大约500个字符后,查询将在查询中间结束,而在输出prepare $ query变量时,将显示完整查询.

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?

此致

推荐答案

使用以下脚本,我已经能够使$pdoStmt->debugDumpParams()写出超过4000个字符.看来您正在经历的限制500并不是对函数本身的严格限制.也许您组成查询的一项操作限制为500个字符?

Using the following script, I have been able to make $pdoStmt->debugDumpParams() write out more than 4000 characters. It seems the limit of 500 you are experiencing is not a hard limit of the function itself. Perhaps one of your operations to compose the query is limited to 500 characters?

$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上.)

(This was on PHP 5.2.11.)

这篇关于PDO :: debugDumpParams的输出是否有最大值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆