Method: db::join
Joins two tables and returns data from them
Info
Syntax
db::join($table_1, $table_2, $on, $select, $where=null, $order=null, $page=null, $limit=null, $type="JOIN")
Parameters
- $table_1 (string) The table name of the first table
- $table_2 (string) The table name of the second table
- $on (string) The MySQL ON clause without the ON keyword. ie: "user_id = comment_user"
- $select (mixed) Either an array of fields or a MySQL string of fields
- $where (mixed) Either a key/value array as AND connected where clause or a simple MySQL where clause string
- $order (string) Order clause without the order keyword. ie: "added desc"
- $page (int) a page number
- $limit (int) a number for rows to return
- $type (string) The join type (JOIN, LEFT, RIGHT, INNER)