There is something I don\'t quite understand it at all which is prepare and query in mysqli.
This one is using mysqli::query t
Sorry that this is not an answer, but I am not good enough to actually leave a comment.
It looks like there is a bug in your second function. Your code won't work correctly for queries that return more than one row. Shouldn't that return statement be:
while($stmt->fetch()) {
//to dereference
$row_copy = $parameters;
$return_array[] = $row_copy;
}
And then the function should end with:
return $return_array;