Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有机会从所有参数代替标记的学说 Query Builder 对象获取 DQL 查询?
Couse$query->getDQL()将返回查询,但使用参数标记而不是实际值,即使它们已由setParameter函数设置。
$query->getDQL()
setParameter
您可以通过以下方式获取参数$query->getParameters()
$query->getParameters()
print_r(array( 'dql' => $query->getDQL(), 'parameters' => $query->getParameters(), ));