I am working on a project. I am using symfony2 with XAMPP with PHP version of 5.5.19. I have three tables that have relationship ..
Here are the tables :
table_name : transaction_tbl
- transaction_id
-filename
-filepath
-sender
-doctype_id
table_name : doctype_tbl
-doctype_id
- doctype
-name
-description
table_name : transaction_details
- details_id
-ref_numbers
-amount
-transaction_id
what I want to do is to join the three tables so I can get the doctype with its details. Meaning need to join also the transaction and the transaction details. I don't know how to do it. Can somebody help ?
UPDATE
I forgot to say that I am using doctrine query builder.
See Symfony2 / Doctrine multiple joins returns error for details.
The best way is probably to use Doctrine ORM, define your entities and their relations with annotations, and use Doctrine QueryBuilder to interact with your data.
See http://symfony.com/doc/current/book/doctrine.html.