Skip to content

Commit 7fb9b51

Browse files
authoredSep 24, 2018
Fix broken links to the Doctrine docs
1 parent 4eb08b5 commit 7fb9b51

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed
 

‎knpu/raw-sql-queries.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ database queries.
3434

3535
So this DBAL Connection objects is *our* key to running raw database queries.
3636
Google for "Doctrine DBAL Query" so we can follow its docs. Find the
37-
[Data Retrieval And Manipulaton](http://doctrine-dbal.readthedocs.org/en/latest/reference/data-retrieval-and-manipulation.html)
38-
section. Scroll down a little to a good example:
37+
[Data Retrieval And Manipulaton][data-retrieval-and-manipulation] section.
38+
Scroll down a little to a good example:
3939

4040
```php
4141
$sql = "SELECT * FROM articles WHERE id = ?";
@@ -119,11 +119,15 @@ still learning it, totally use SQL. It's no big deal.
119119
## Native Queries?
120120

121121
One slightly confusing thing is that if you google for "doctrine raw sql",
122-
you'll find a different solution - something called [NativeQuery](http://doctrine-orm.readthedocs.org/en/latest/reference/native-sql.html).
122+
you'll find a different solution - something called [NativeQuery][native-sql].
123123
It sort of looks the same, just with some different function names. But there's
124124
this `ResultSetMapping` thing. Huh. This `NativeQuery` thing allows you to
125125
run a raw SQL query and then map that *back* to an object. That's pretty neat
126126
I guess. But for me, if I'm writing some custom SQL, I'm fine just getting
127127
back an array of data. I can deal with that. The `ResultSetMapping` confuses
128128
me, and probably isn't worth the effort. But it's there if you want to geek
129129
out on it.
130+
131+
132+
[data-retrieval-and-manipulation]: https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html
133+
[native-sql]: https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/native-sql.html

0 commit comments

Comments
 (0)
Please sign in to comment.