CodeSOD: Caught a Mistake (opens in new tab)
Daniel recently started a new job. His first task was to fetch some data from the database and render it to the user. Easy enough, and there were already wrapper functions around the database to make it easy. He called execute_read, passed it a query, and checked the results. There were no results. But the query definitely should have returned results. What was going on? def execute_read(conn, query, params, only_one=False): result = None cursor = None try: start_time = time.time() cursor = c...
Read the original article