我不知道這是否可能,但這就是我想做的。我有三張桌子帳戶id | username | pass汽車id | plate | id_ac | kilometers // in the id_ac I add manual the id of the car's owner.旅行id | plate | places | date | active現在,我希望當用戶登錄時,可以看到與他的汽車一起處于活動狀態的Trips。所以我想SELECT from Trips the plate, places, date WHERE active=0 AND id= ? (the logged user's id)但是餐桌旅行沒有車主的ID。因此,我想以某種方式選擇已登錄用戶擁有的汽車的“行程”表的值。任何想法我怎么能這樣做?
多個表選擇
慕婉清6462132
2022-09-03 16:26:59