Reputation: 14978
We use a similar query in our different code base 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?
Upvotes: 0
Views: 222
Reputation: 3537
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.
Upvotes: 1