-2

I'm trying to use the QueryBuilder in Symfony and Doctrine and do a query with 2 tables. This will be the code in SQL:

SELECT a.id, a.url FROM example1 AS a, example2 AS b WHERE a.id = b.id;

I think it's a simple question but i didn't find anything on Internet...

HessianMad
  • 549
  • 7
  • 23
  • check https://stackoverflow.com/questions/15377079/doctrine-query-builder-using-inner-join-with-conditions Regards – Albeis Aug 09 '17 at 14:34

1 Answers1

0

Selection from multiple tables is some kind of alias for JOIN syntax

SELECT a.id, a.url FROM example1 AS a INNER JOIN example2 AS b ON a.id = b.id

So I think with JOIN syntax you can do it with Doctrine easier ;)