populate_db() raises a syntax error tied up in transaction_query()