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
-~----------~----~----~----~------~----~------~--~---

Reply via email to