{#each fehler as f}
{f}
{/each}
<script>
  export let schueler, klasse, privat
  const { Pool } = R('pg')
  const pool = new Pool({ connectionString: privat.mein_bk_db})
  let fehler = []
  const update_fehler = async () => {
    const query = `SELECT * FROM fehler`
    try {
      const res = await pool.query(query)
      fehler = JSON.stringify(res.rows)
      console.log(res.rows)
    } catch(err) {
      console.log(err.stack)
    }
  }
  update_fehler()
</script>

