JDatabase/stderr
From Joomla! Documentation
< API16:JDatabaseRevision as of 17:40, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Print out an error statement
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
...)
Revision as of 17:40, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Print out an error statement
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
...)
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
Template:Description:JDatabase/stderr
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";
}
}
[Edit See Also] Template:SeeAlso:JDatabase/stderr
Examples[edit]
<CodeExamplesForm />