Login

executesql

Author:
amitu
Posted:
March 20, 2009
Language:
Python
Version:
1.0
Score:
1 (after 1 ratings)

A helper function for quick and dirty sql calls.

1
2
3
4
def executesql(query,param):
    from django.db import connection
    cursor = connection.cursor()
    return cursor.execute(query,param)

More like this

  1. "Magic Link" Management Command by webology 3 months ago
  2. Closest ORM models to a latitude/longitude point by simonw 3 months ago
  3. Log the time taken to execute each DB query by kennyx46 3 months ago
  4. django database snippet by ItsRLuo 3 months ago
  5. Serialize a model instance by chriswedgwood 4 months ago

Comments

Please login first before commenting.