extends |
XoopsModelAbstract |
---|
Usage of methods provided by XoopsModelJoint:
Step #1: set linked table and adjoint fields through XoopsPersistableObjectHandler: $handler->table_link = $handler->db->prefix("the_linked_table"); // full name of the linked table that is used for the query $handler->field_link = "the_linked_field"; // name of field in linked table that will be used to link the linked table with current table $handler->field_object = "the_object_field"; // name of field in current table that will be used to link the linked table with current table; linked field name will be used if the field name is not set Step #2: fetch data
Methods | ||||||
---|---|---|---|---|---|---|
public
|
validateLinks()
Validate information for the link
Validate information for the link |
# | ||||
public
|
getCountByLink(CriteriaElement|CriteriaCompo $criteria = null): int|false
Count of objects matching a condition
Count of objects matching a condition Parameters
Returnscount of objects |
# | ||||
public
|
getCountsByLink(CriteriaElement|CriteriaCompo $criteria = null): int|false|array|null
array of count of objects matching a condition of, groupby linked object keyname
array of count of objects matching a condition of, groupby linked object keyname Parameters
Returnscount of objects |
# | ||||
public
|
updateByLink(array $data, CriteriaElement|CriteriaCompo $criteria = null): int|null
update objects matching a condition against linked objects
update objects matching a condition against linked objects Parameters
Returnscount of objects |
# | ||||
public
|
deleteByLink(CriteriaElement|CriteriaCompo $criteria = null): int|null
Delete objects matching a condition against linked objects
Delete objects matching a condition against linked objects Parameters
Returnscount of objects |
# |
Methods inherited from XoopsModelAbstract |
---|
__construct(), setHandler(), setVars() |
Properties inherited from XoopsModelAbstract |
---|
$handler |