2
쿼리 빌더를 통해 Laravel 4에서 내부 조인과 함께 삭제할 수 있습니까?Laravel 4의 삭제로 삭제 쿼리 빌더
DELETE s.* FROM spawnlist s
INNER JOIN npc n ON s.npc_templateid = n.idTemplate
WHERE (n.type = "monster");
내가 좋아하는 뭔가를 시도했다 : :
나는이 샘플 쿼리 (sample query taken from this source.)이
DB::table('spawnlist as s')
->join('npc as n', 's.npc_templateid', '=', 'n.idTemplate')
->where('n.type', 'monster')
->delete();
을하지만 여기에서 할 수없는 조인 것 같다?
어떻게 where 절에 대해? – Vainglory07
당신은 여전히 같은 삭제 방법 전에 그것을 추가 할 수 있습니다 ... DB :: table ('spawnlist') -> ('table.field', 'table.field') -> delete(); –