Dingo supports basic JOIN queries. Suppose you have two tables, users and friends, that have the following rows:

You could run a simple JOIN query on these tables like so:
// Select the users table
$table = db('mytable');
$res = $table->select('*')
->where('id','=',1)
->join('friends')
->on('users.id','=','friends.user')
->execute();
print_r($res);
Notice the only difference between this query and a regular select is the addition of the join() and on() methods. The above would display something like the following:
Array
(
[0] => Array
(
[id] => 1
[name] => Evan
[user] => 1
[friend] => 2
)
[1] => Array
(
[id] => 1
[name] => Evan
[user] => 1
[friend] => 3
)
)
© 2008 - 2012 Evan Byrne