stelthius Posted July 12, 2009 Share Posted July 12, 2009 Hello all, So the other day my friend used a tag to display all his php queries in raw data at the top of his page to see what the last query to run was so he could see were the issue was with his code, im pretty sure it was something to do with print, im desperately trying to find out what he used i cant ask him as he hasnt been online all day long can anyone help me out with this ? Quote Link to comment https://forums.phpfreaks.com/topic/165687-displaying-mysql-query-in-php/ Share on other sites More sharing options...
ignace Posted July 12, 2009 Share Posted July 12, 2009 $queryLog = array(); $query = 'SELECT * FROM table'; $result = mysql_query($query, $db); if ($result) { $queryLog[] = $query; .. } // get last executed query: print array_pop($queryLog); Quote Link to comment https://forums.phpfreaks.com/topic/165687-displaying-mysql-query-in-php/#findComment-873991 Share on other sites More sharing options...
stelthius Posted July 12, 2009 Author Share Posted July 12, 2009 No to say your method doesnt work but it wasnt that it was like one word and a colon Quote Link to comment https://forums.phpfreaks.com/topic/165687-displaying-mysql-query-in-php/#findComment-873995 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.