Select *
from po_table
WHERE sender_uid = "User Input" and po_no IN (
Select po_no WHERE receiver_uid = login_rec_uid
);
答案 0 :(得分:0)
尝试使用activeRecord类中的find()
e.x:
$ senderid = Sender :: find() - > where(['id'=> $ userInputID]) - > one();
来源:http://www.yiiframework.com/doc-2.0/yii-db-baseactiverecord.html#findOne()-detail