Q: MySQL returning different result when querying different columns SQL statement 1
const [rows, fields] = await pool.query("SELECT * FROM accounts WHERE username = ?", username);
console.log(rows);
return rows

SQL statement 2
const [rows, fields] = await pool.query("SELECT * FROM accounts WHERE id = ?", id);
console.log(rows)
return rows

It is the same database but the result I am getting back is displayed differently. 
For the query for username,
[
  TextRow {
    id: 8,
    username: 'testing',
    password: '-',
    aws_id: '-',
    timestamp: 2020-02-23T23:38:06.000Z
  }
]

For the query by id
{
  '0': TextRow {
    id: 8,
    username: 'testing',
    password: '-',
    aws_id: '-',
    timestamp: 2020-02-23T23:38:06.000Z
  }
}

Why is it that when I am querying with ID, there is a "0" key appended to it.

A: Its possible that because id is unique, the results will never be a list of items, and "whatever you're using to connect to mysql" automatically formats for that.
some browsers also routinely add indexes to json that arent actually in the data. make sure you're not following a false-positive here and use "raw data" to view it


