Changed CSV detail upload to use prepared statement