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 8 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->canDelete

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

Last reviewed: Not reviewed
phpDocumentor

mosDBTable->canDelete

Checks whether it is safe to delete a record from the table by checking whether dependancies exist for this record in the database schema.  It does this by performing a join between this table and the tables to be checked.  If the join returns an empty result set then it should be safe to delete the record. This function may be overloaded/supplemented by the child class as required.

Syntax

boolean canDelete ( [ int $id [, array $joins ]] )

$id
is the primary key index for the record to be checked. This parameter is optional and if omitted will default to null.
$joins
is an array. This parameter is optional and if omitted will default to null. If this parameter is present then each entry in the $joins array must contain the following items:
label
is a string that will be used to explain the dependency in an error message.
name
is the name of the table to be checked for a dependency by a join.
idfield
is the name of the primary key field in the table to be joined.
joinfield
is the name of the field in the joined table to be used in the join.

Examples


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

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