[eluser]RJ[/eluser]
Not quite, that produced an error with no output, I adjusted to this:
Code:
$this->db->select('a.unique_id, b.NetModemName');
$this->db->join('nrd_archive.raw_ip_stats_0 AS a', 'nms.NetModem AS b');
$this->db->where('a.unique_id = b.NetModemId');
$this->db->group_by('b.NetModemId', 'asc');
$query = $this->db->get('nrd_archive.raw_ip_stats_0 a');
And receive this
Quote:Error Number: 1066
Not unique table/alias: 'a'
SELECT `a`.`unique_id`, `b`.`NetModemName` FROM (`nrd_archive`.`raw_ip_stats_0` a) JOIN `nrd_archive`.`raw_ip_stats_0` AS a ON `nms`.`NetModem` `AS` b WHERE `a`.`unique_id` = b.NetModemId GROUP BY `b`.`NetModemId`
CI doesn't appear to like aliased tables 'a' or 'b'. I'm not an expert by any means, unless you have any ideas I'll have to stick with the normal query.