API15:JDatabase/stderr
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Contents |
Description
Print out an error statement
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
stderr($showSQL=false)
| Parameter Name | Default Value | Description |
|---|---|---|
| $showSQL | false | If TRUE, displays the last SQL statement sent to the database |
Returns
string A standised error message
Defined in
libraries/joomla/database/database.php
Importing
jimport( 'joomla.database.database' );
Source Body
function stderr( $showSQL = false ) { if ( $this->_errorNum != 0 ) { return "DB function failed with error number $this->_errorNum" ."<br /><font color=\"red\">$this->_errorMsg</font>" .($showSQL ? "<br />SQL = <pre>$this->_sql</pre>" : ''); } else { return "DB function reports no errors"; } }
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
<CodeExamplesForm />
