Do i need to do some sort of type casting before the binding?
You are already doing type casting here:
$stmt->bind_param('i', $day);
This coerces $day
into an integer, because of the first parameter value 'i'
and then passes that value to the database.
For example, if your variable were '123hello'
, only 123
would be passed.