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.

