There is two table : admin , news
The structure is like this:
admin
-----
id
name
news
-----
id
createBy
updateBy
currently the createBy and updateBy stores the admin id , I would like to get the admin name of createBy and updateBy, how to achieve that? Thanks
Here is what I used in codeigniter
$this->db->select('*');
$this->db->from('news,admin');
$this->db->where('id', $id);
$this->db->where('admin.id', 'news.updateBy');
Anyway the sql query is welcome, I will convert it to codeigniter syntax . Thanks for helping