Joomla Print Query

echo($query->__toString());
Viktoras Buivydas