[Tutor] SQL Queries For MySQL

Faran Uddin faranuddin at gmail.com
Thu Oct 12 06:08:26 CEST 2006


i m running a mysql database, i create the connections and such using
MySQLdb.

someone told me that queries like

query = "SELECT * FROM DB WHERE NAME = %s" % (name)
cursor.execute(query)

thats the syntax that i use, but someone told me not to use it, i m new to
the db accessing thing, so if anyone can plz explain this and also send me
an example of how to do this properly, it'll help me quite a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061011/65901824/attachment.htm 


More information about the Tutor mailing list