开发者

Finding the source of query in General Log

开发者 https://www.devze.com 2023-03-31 02:22 出处:网络
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.

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

精彩评论

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