Sleightly enhanced profiler for queries - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Sleightly enhanced profiler for queries (/showthread.php?tid=6100) |
Sleightly enhanced profiler for queries - El Forum - 02-14-2008 [eluser]kandmcreative[/eluser] I tried to add this to the "Ignited Code" forum, but it won't submit. Sorry if this is in the wrong place. In libraries/Profiler.php, we have modified it to output breaks before highlighted keywords for even nicer sql profiler output. Perhaps this would be beneficial to others, or worthy of adding to SVN. Code: $highlight = array('SELECT', 'FROM', 'WHERE', 'AND', 'ORDER BY', 'LEFT JOIN', ' OR', 'LIMIT', 'INSERT', 'INTO', 'VALUES', 'UPDATE', 'UNION' , 'INNER JOIN','GROUP BY'); Outputs like this (with keywords bolded): Code: SELECT tblCredits.CreditID, CreditDate, CreditType, tblCredits.CreditAmount, Notes, Reference, SUM(tblItemCredits.CreditAmount) AS ItemCredit |