Enhanced deletion script to allow access to db object directly.
This allows the user to choose wheather better issue plain SQL or operate on the objects (suggested)
This commit is contained in:
parent
8b25925ec4
commit
e6db7787ef
@ -331,7 +331,7 @@ abstract class AbstractCommonClubsModel
|
|||||||
$q->where("id = {$this->id}");
|
$q->where("id = {$this->id}");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function prepareDelete()
|
protected function prepareDelete($db)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public function delete()
|
public function delete()
|
||||||
@ -345,7 +345,7 @@ abstract class AbstractCommonClubsModel
|
|||||||
$q->where("id = {$this->id}");
|
$q->where("id = {$this->id}");
|
||||||
|
|
||||||
$db->transactionStart();
|
$db->transactionStart();
|
||||||
$this->prepareDelete();
|
$this->prepareDelete($db);
|
||||||
$db->setQuery($q);
|
$db->setQuery($q);
|
||||||
$db->execute();
|
$db->execute();
|
||||||
$db->transactionCommit();
|
$db->transactionCommit();
|
||||||
|
Loading…
Reference in New Issue
Block a user