Jojo Siao

Icon

enjoying life

Querying MySQL tables with Python and MySQLdb

Previously I made a  blog post regarding installing mod_python. Now I will share with you how to query mysql tables with Python and MySQLdb.

Installing MySQLdb

If we want to check if mysqldb is already installed, type ‘python’ on the commandline and then, type ‘import MySQLdb’. If it does not respond to an error, it means you have it already installed.

Checking MySQLdb

Checking MySQLdb

Read the rest of this entry »

A complicated SQL Query needed at work

There was this cron job that I made that saves daily on-hand quantity of our items/goods, and my boss just needed one of our principal’s items trade prices with VAT be computed with that data for the month of July this year.
Read the rest of this entry »