using
while( $row = $query->fetch_assoc() ) {
statement relating $row
}
The loop Will Escape the first OR the Zeroth Index in the Query as While loop loops till the End of the Array is reached the $row is assigned automatically the first value and is per-incremented so you wont help Array(first_query);
if you want it to retrieve values from your db use a array such that
$a2=array();
$a2[0]=mysqli_fetch_assoc($my_sql_query); //fetches the first missing value
while( $row = $query->fetch_assoc() ) {
statement relating $row
$a2[]=$row;
}
echo json_decode($a2);