@Mark,
Thanks for your help. Anyway this alias in not working for me even with the most simple piece of code:
<?php
class Posts_model extends MY_Model
{
function __construct()
{
parent::__construct();
$this->load_table('posts');
$this->load_table('links', 'urls');
$this->posts->related('links', array('link', 'id'));
}
public function count_links($box)
{
return $this->with("urls")->count(array('name' => $box));
}The result for this is:
A Database Error Occurred
Error Number: 1146Table ‘db_name_here.urls’ doesn’t exist
I guess I am doing something generaly wrong then :/