Documentation Menu

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 7 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 Manual arrow 11. API Reference arrow [WORKING] mosDBTable->getError

[WORKING] mosDBTable->getError PDF Print E-mail

Last reviewed: Not reviewed


Returns the most recent error message.


string getError ( )


Example: This example uses the myTable class defined on the mosDBTable class overview page. The error message shown here results from not having created the jos_myTable table.

global $database;
// Declare an instance of the myTable class.
$myTbl = new myTable( $database );
// Try to delete a record from the table.
$uid = 17;
if (!$myTbl->delete( $uid )) {
  echo str_replace( array( '\n', "\'" ), array( '', "'" ), $myTbl->getError() );
  echo "\n";

which might output:

Table 'test.jos_myTable' doesn't exist SQL=DELETE FROM jos_myTable WHERE id = '17'

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

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