I'm having some trouble passing in dynamic variables into my query. Please ignore the poor style. This is what I'm trying to run:
> sql = "SELECT COUNT(*) FROM artifacts WHERE " \
> "url = '%s' AND " \
> "source_id = '%s'"
> self.db.execute(sql, (url, source_id))
I get the error:
self.db.execute(sql)
AttributeError: execute
For the life of me, I can't figure out why it's throwing an attribute error. In the User Guide, the example clearly passes in an a correct attribute.
I've been following: http://mysql-python.sourceforge.net/MySQLdb.html
bites on lip eug.