下面是两个表的一些样本数据中的所有记录: -获取存在两个表
Uploads:
id: 1 , file_ref:abc
id: 2, file_ref: abc1
id: 4, file_ref: abc3
id: 5, file_ref: abc4
id: 6, file_ref: abc5
id: 7, file_ref: abc6
media:
id: 3, name: 'My Doc' , type: doc
id: 6, name: 'My Img' , type: img
我有这2种型号的轨道。 现在在我的控制器中,我希望在媒体表中存在上传的所有记录,即来自使用ID 3和6的上传表的记录。
该ID是共享的?因此,唯一的记录是'id:6,file_ref:abc5 ',因为'id 3'在表格媒体中不存在? – MatayoshiMariano
您可以将** abc5 **的值更改为** 5 **,还是您必须首先获取该号码,然后才能找到 – MZaragoza
上传中将存在所有媒体,但file_ref仅在上传中可用这是我想要的。所以我必须从上传表格中获取id 6和3的记录。 – AHK