Skip to content

Commit 16a68a3

Browse files
committed
Working on doc
1 parent e45ab00 commit 16a68a3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ Fed up of writing joins in SQL? Let MagicQuery do the work for you!
6464

6565
Seriously? Yes! All you have to do is:
6666

67-
- Pass a **Doctrine DBAL connection** to MagicQuery's constructor. MagicQuery will analyze your schema.
67+
- Pass a **[Doctrine DBAL connection](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/)** to MagicQuery's constructor. MagicQuery will analyze your schema.
6868
- In your SQL query, replace the tables with `magicjoin(start_table)`
69+
- For each column of your query, use the complete name ([table_name].[column_name] instead if [column_name] alone)
6970

7071
Let's assume your database schema is:
7172

@@ -108,7 +109,7 @@ Is it a MySQL only tool?
108109
------------------------
109110

110111
No. By default, your SQL is parsed and then rewritten using the MySQL dialect, but you use any kind of dialect
111-
known by Doctrine DBAL. Magic-query optionally uses Doctrine DBAL. You can pass a `Connection` object
112+
known by [Doctrine DBAL](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/). Magic-query optionally uses Doctrine DBAL. You can pass a `Connection` object
112113
as the first parameter of the `MagicQuery` constructor. Magic-query will then use the matching dialect.
113114

114115
For instance:

doc/magic_join.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ Seriously? Yes! All you have to do is:
77

88
- Pass a **Doctrine DBAL connection** to MagicQuery's constructor. MagicQuery will analyze your schema.
99
- In your SQL query, replace the tables with `magicjoin(start_table)`
10+
- For each column of your query, use the complete name ([table_name].[column_name] instead if [column_name] alone)
1011

1112
Let's assume your database schema is:
1213

13-
![Sample database schema](doc/images/schema1.png)
14+
![Sample database schema](images/schema1.png)
1415

1516
Using MagicJoin, you can write this SQL query:
1617

@@ -64,4 +65,3 @@ Now that you understand the concept, you should understand the power and the lim
6465

6566
<div class="alert alert-warning">MagicJoin is meant to be used on the 80% of the cases where writing joins is trivial
6667
and boring. If you have complex joins, do not try to use MagicJoin. Go back to pure SQL instead.</div>
67-

0 commit comments

Comments
 (0)