1

I have just look the laravel documentation, and I don't see any intersect method with Eloquent... How can I do this ?

SELECT * FROM `store_1`
INTERSECT
SELECT * FROM `store_2`
INTERSECT
SELECT * FROM `store_3`
user3207586
  • 141
  • 4
  • 14
  • You tagged this `MySQL`, AFAIK, that has no `INTERSECT`, or did I miss it's introduction? Anyway: [look at this for `INTERSECT` in MySQL](http://stackoverflow.com/questions/2300322/intersect-in-mysql), and you can probably rewrite it to that method. – Wrikken Aug 19 '14 at 22:10
  • You have option to use `DB::raw(...)`. – The Alpha Aug 20 '14 at 01:26
  • There is no intersect in `Query\Builder` so you need `DB::raw` and if it's `MySql`, then it might be `from(DB::raw('main_table join another_table using (fields) join ...'))->distinct()` since there's no `intersect`. – Jarek Tkaczyk Aug 20 '14 at 10:27

0 Answers0