标签:end sel nal dna mit war min from term
$sql = ‘select id,start, type, (case
when type = ? THEN
(select truename
from users
where users.id = start limit 1)
when type = ? then
(select name
from warehouse wh
where wh.id = start limit 1)
end) AS startname, (
select name
from warehouse wh
where wh.id = destination
) AS endname
FROM terminal_operation where type in (?,?)‘;
$res = DB::select($sql, [8,13,8,13]);
标签:end sel nal dna mit war min from term
原文地址:https://www.cnblogs.com/yin5th/p/10249113.html