hi gang.  For various reasons i've decided to use a raw sql statement
in my view.  Following the example located at
http://docs.djangoproject.com/en/dev/topics/db/sql/, I have a view
which looks like this:


def searchform(request):
  from django.db import connection
  ...
  # a massive sql statement is dynamically built here. called sqlall
(used below)

  try:
    #setup recordset
    cursor=connection.cursor()
    cursor.execute (sqlall)
    tms=cusor.fetchall()  #this will be pushed back to the template
  except IndexError:
    #nothing found so redirect to "no results page"
    return HttpResponseRedirect ('/search/results/none/')

...


When I assert the sqlall variable, the sql statement executes
perfectly in phpmyadmin.  However, Django throws the following
traceback:

not enough arguments for format string

I have no idea what this error means and why it's not working... any
ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to