1 $details = Db::name('food') 2 -> alias('a') 3 -> field('a.food_code,a.food_name,a.food_u1,a.food_p1,a.foods_id,b.foods_name') 4 -> join('food_classfiy b','a.foods_id = b.foods_id') 5 -> whereIn('a.food_id',$ids) 6 -> select();
1 $details = Db::name('food') 2 -> alias('a') 3 -> field('a.food_code,a.food_name,a.food_u1,a.food_p1,a.foods_id,b.foods_name') 4 -> join('food_classfiy b','a.foods_id = b.foods_id') 5 -> whereIn('a.food_id',$ids) 6 -> select();
转载于:https://www.cnblogs.com/CcPz/p/9306620.html