Changeset 2863
- Timestamp:
- 05/06/06 18:16:43 (2 years ago)
- Files:
-
- django/trunk/docs/model-api.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/model-api.txt
r2850 r2863 1582 1582 return row 1583 1583 1584 If your custom SQL statement alters the data in your database -- for example,1585 via a ``DELETE`` or ``UPDATE`` -- you'll need to call ``db.commit()``. Example::1586 1587 def my_custom_sql2(self):1588 from django.db import connection1589 cursor = connection.cursor()1590 cursor.execute("DELETE FROM bar WHERE baz = %s", [self.baz])1591 connection.commit()1592 1593 1584 ``connection`` and ``cursor`` simply use the standard `Python DB-API`_. If 1594 1585 you're not familiar with the Python DB-API, note that the SQL statement in
