db1 数据库1
db2 数据库2
table1 数据表1
table2 数据表2
$spell = $this->SpellApply ->table('db1.table1 t1,db2.table2 t2')
->field('t1.uid,t2.avatar_img')
->where('t1.uid=t2.uid and t1.spell_id ='.$id)
->order('t1.create_time desc')
->group('t1.uid')
->select();
网友评论