PHP中具有正确错误检测的Mysql查询
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP中具有正确错误检测的Mysql查询相关的知识,希望对你有一定的参考价值。
Dumps whole query so developer can see where is error. However it's potential security issue, exposing SQL commands to attacker. (Recommended to use only during development, replace message code with some custom error text)
$sql="select something from something_else"; if (!$res_id) { $message .= 'Whole query: ' . $sql; }
以上是关于PHP中具有正确错误检测的Mysql查询的主要内容,如果未能解决你的问题,请参考以下文章
如何在 PHP 函数中正确使用 MySQL 查询? [关闭]