Skip to content

Instantly share code, notes, and snippets.

@janich
Created February 19, 2013 08:42
Show Gist options
  • Save janich/4984102 to your computer and use it in GitHub Desktop.
Save janich/4984102 to your computer and use it in GitHub Desktop.
Ugly, but helpfull!
function q($query) {
echo "<pre>";
$q = str_replace("#__", JFactory::getConfig()->get('dbprefix'), (string) $query);
var_dump($q);
echo "</pre>";
}
@twentronix
Copy link

It's still on my TODO to check out the Joomla extension J!Dump, so I can't say how handy it is, but it looks promising:
http://extensions.joomla.org/extensions/miscellaneous/development/1509

I also use var_dump. If you view the source you don't need to add the pre tags, but the pre tags are indeed necessarily if you want to view it in readable html format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment