Object joint handler class.
- Author
- Taiwen Jiang phppp.nosp@m.@use.nosp@m.rs.so.nosp@m.urce.nosp@m.forge.nosp@m..net
XoopsObjectAbstract 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
Definition at line 38 of file joint.php.
| & XoopsModelJoint::getByLink |
( |
|
$criteria = null, |
|
|
|
$fields = null, |
|
|
|
$asObject = true, |
|
|
|
$field_link = null, |
|
|
|
$field_object = null |
|
) |
| |
get a list of objects matching a condition joint with another related object
- Parameters
-
| object | $criteria | CriteriaElement to match |
| array | $fields | variables to fetch |
| bool | $asObject | flag indicating as object, otherwise as array |
| string | $field_link | field of linked object for JOIN; deprecated, for backward compat |
| string | $field_object | field of current object for JOIN; deprecated, for backward compat |
- Returns
- array of objects XoopsObject
Definition at line 67 of file joint.php.
References $criteria, $fields, $limit, $result, $ret, $sql, and $start.