summaryrefslogtreecommitdiff
path: root/docs/topics/db/sql.txt
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-12-21 01:53:39 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-12-21 01:53:39 +0000
commit79d6e402e3a19490f2ab2c24cbe4b416ee8926e7 (patch)
treecf3b9e08c5433f0ee39c8718854f9042d759b078 /docs/topics/db/sql.txt
parentc804179126179bdbf643160202ef01d49b627f17 (diff)
Fixed #12409 -- Corrected some documentation typos in the docs on raw querysets. Also added a missing __init__.py file. Thanks to Alex Gaynor for the reports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11924 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics/db/sql.txt')
-rw-r--r--docs/topics/db/sql.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt
index 57834eb98a..45aa4f950e 100644
--- a/docs/topics/db/sql.txt
+++ b/docs/topics/db/sql.txt
@@ -154,13 +154,13 @@ parameters from the ``params`` list.
It's tempting to write the above query as::
- >>> query = 'SELECT * FROM myapp_person WHERE last_name = %s', % lname
+ >>> query = 'SELECT * FROM myapp_person WHERE last_name = %s' % lname
>>> Person.objects.raw(query)
**Don't.**
Using the ``params`` list completely protects you from `SQL injection
- attacks`__`, a common exploit where attackers inject arbitrary SQL into
+ attacks`__, a common exploit where attackers inject arbitrary SQL into
your database. If you use string interpolation, sooner or later you'll
fall victim to SQL injection. As long as you remember to always use the
``params`` list you'll be protected.