Skip to content

Instantly share code, notes, and snippets.

@tiomoreno
Created February 25, 2013 15:34
Show Gist options
  • Save tiomoreno/5030642 to your computer and use it in GitHub Desktop.
Save tiomoreno/5030642 to your computer and use it in GitHub Desktop.
import config.mysql as dbconfig
from MysqlFactory import MysqlFactory
connection = MysqlFactory().getConnection(dbconfig.params)
cursor = connection.cursor()
query = """
SELECT
*
FROM
log
WHERE
log.id_course is null
"""
cursor.execute(query)
result_set = cursor.fetchall();
print cursor.rowcount
connection.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment