[eluser]meigwilym[/eluser]
Do you mean an alias for table names? This is what I think you need (personally, I like to write out my SQL queries, so I'll do the same here).
Code:
$sql = "SELECT * FROM subcategories AS sc
INNER JOIN categories AS c
ON sc.category_id = c.category_id";
$query = $this->db->query($sql);
return $query->row_result();
Bear in mind that this query will return everything, so you may need a WHERE clause too, but that depends on your needs, of course.
Best,
Mei