basic python lookup in mysql database