input: Write a python function to insert data from a file into a MySQL database table, with assert statements to check the inserts.
  assert insertOrderingcompany(db, 'orderingcompany') is None
  assert insertDomain(db) is None
  assert insertSubDomain(db) is None
output: import mysql.connector
  import csv
  
  def insert_data_from_file(db_config, table_name, file_path):
      # Connect to the database
      conn = mysql.connector.connect(**db_config)
      cursor = conn.cursor()
  
      # Read data from the file
      with open(file_path, mode='r') as file:
          csv_reader = csv.reader(file)
          headers = next(csv_reader)
  
          # Insert data into the table
          for row in csv_reader:
              placeholders = ', '.join(['%s'] * len(row))
              sql = f"INSERT INTO {table_name} ({', '.join(headers)}) VALUES ({placeholders})"
              cursor.execute(sql, row)
  
      # Commit the transaction
      conn.commit()
      cursor.close()
      conn.close()
  
  # Example usage (this will need actual database config and file path to run)
  # db_config = {
  #     'user': 'your_user',
  #     'password': 'your_password',
  #     'host': 'your_host',
  #     'database': 'your_database'
  # }
  # insert_data_from_file(db_config, 'your_table', 'your_file.csv')