JDatabase/stderr
From Joomla! Documentation
< API16:JDatabase
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Print out an error statement
<! removed transcluded page call, red link never existed >
Syntax[edit]
stderr($showSQL=false)
Parameter Name | Default Value | Description |
---|---|---|
$showSQL | false | If TRUE, displays the last SQL statement sent to the database |
Returns[edit]
string A standised error message
Defined in[edit]
libraries/joomla/database/database.php
Importing[edit]
jimport( 'joomla.database.database' );
Source Body[edit]
public 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 transcluded page call, red link never existed >
Examples[edit]
Code Examples[edit]