import csv
import mariadb
import sys

# Connect to MariaDB Platform
#try:
#    conn = mariadb.connect(   
#        user="db_user",
#        password="db_user_passwd",
#        host="192.0.2.1",
#        port=3306,  
#        database="employees"
#    )   
#except mariadb.Error as e:
#    print(f"Error connecting to MariaDB Platform: {e}")

    # Get Cursor
#    cur = conn.cursor()


with open('lists/ifx_price_csv.csv') as csv_file:
    csv_reader = csv.reader(csv_file, delimiter=',')
    line_count = 0
    
    for row in csv_reader:
        if line_count == 0:
            print(f'{row[0]}')
            line_count += 1
        else:
            print(f'\t{row[0]} works in the {row[1]} department, and was born in {row[2]}.')
            line_count += 1
    print(f'Processed {line_count} lines.')
