jjzjj

updateBy

全部标签

php - 查询获取相关表中的数据

有两个表:admin,news结构是这样的:admin-----idnamenews-----idcreateByupdateBy目前createBy和updateBy存储的是adminid,我想获取createBy和updateBy的adminname,如何实现?谢谢这是我在codeigniter中使用的$this->db->select('*');$this->db->from('news,admin');$this->db->where('id',$id);$this->db->where('admin.id','news.updateBy');无论如何,欢迎使用sql查询,我会