1.5 Template Project

The Joomla! Documentation Working Group is running a project to develop detailed reference and tutorial material on Joomla! 1.5 templates.  There is a project page on the documentation wiki where you can see the work in progress and help us by contributing your knowledge.

Who's Online

We have 2 guests online

Help Site License

The Joomla! Help Site content is copyright © 2005 - 2008 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution NonCommercial ShareAlike 2.5. Some parts of this website may be subject to other licenses.
Home arrow Developer Manual arrow 11. API Reference arrow [REVIEW] database->getQuery

[REVIEW] database->getQuery PDF Print E-mail

Last reviewed: Not reviewed
phpDocumentor

database->getQuery

Returns the current value of the internal SQL query string (as set-up by database->setQuery).  The string has HTML special characters escaped and will be surrounded by HTML <pre> tags so that it is suitable for output to web browsers in an error message, for example.

Syntax

string getQuery ( )

Examples

Example:

function showQuery( $sql ) {
  global $database;
 
  $database->setQuery( $sql );
  echo 'The query is: ' . $database->getQuery();
}
 
$database->showQuery( 'SELECT * FROM #__users' );

would produce:

The query is: <pre>SELECT * FROM jos_users</pre>

Please report any errors on this page to the Developer Documentation Forum.

Last Updated ( Monday, 25 December 2006 )
 
< Prev   Next >