开发者

Finding the source of query in General Log

We use a similar query in our different code b开发者_StackOverflow社区ase modules and at times it gets difficult to check in General/Slow Query Log to find out the page where it got executed.

Is there anyway to pass some info to server while executing query?


You can put a comment in your queries:

$sql = "-- Called from myfile.php:
    SELECT * from table;";
$res = mysql_query($sql);

The comment will be considered part of the statement and logged along with the query itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜