API15:JDatabase/stderr
From Joomla! Documentation
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
Code Examples