Vote count:
0
Is there a way to make a Delete with Inner Join on Laravel 4 through a query builder?
I have this sample query (taken from this):
DELETE s.* FROM spawnlist s
INNER JOIN npc n ON s.npc_templateid = n.idTemplate
WHERE (n.type = "monster");
I've tried something like:
DB::table('spawnlist as s')
->join('npc as n', 's.npc_templateid', '=', 'n.idTemplate')
->where('n.type', 'monster')
->delete();
But the it seems that the join cannot be done here?
asked 35 secs ago
Delete with Join in Larave 4 Query Builder
Aucun commentaire:
Enregistrer un commentaire