Wow, I think I just figured out what this is about. He's asking if
Django creates queries like
1) "SELECT id, song FROM songs WHERE id = 1"
or
2) "SELECT id, song FROM songs WHERE id = ?", and the passing in the 1
as a parameter.
He says that he saw a query like the first case, and is wondering if
he should open a ticket about it.
On Jul 11, 10:30 pm, Duc Nguyen <[EMAIL PROTECTED]> wrote:
> Carl Karsten wrote:
> > The reason it sounds strange is because that isn't what I was asking :)
>
> > It is pretty much this simple:
>
> > import settings
> > import MySQLdb
>
> > con = MySQLdb.connect(user=settings.DATABASE_USER,
> > passwd=settings.DATABASE_PASSWORD,
> > db=settings.DATABASE_NAME )
> > cur=con.cursor()
>
> > cur.execute("select * from auth_user where id=1" )
> > print cur.fetchall()
> > cur.execute("select * from auth_user where id=%s" % (1,) )
> > print cur.fetchall()
>
> > cur.execute("select * from auth_user where id=%s", (1,) )
> > print cur.fetchall()
>
> > All 3 return the same thing, but only the last one has a chance of the value
> > making it to the server separate from the command, which is a good thing.
>
> Why is it a good thing?> The reason I say 'chance' is because in the case of
> MySQLdb, it gets combined
> > anyway[1]. But that is an implementation detail that A) you should not be
> > relied on
>
> What is the problem with it?
>
> Does anyone have any idea what Carl is asking? :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---