I've found that integers also work if you implode the array within the SQL Query.
Granted I am not using the MySQLi Behavior but here is a solution, but we now need to figure how to do this WITH the behavior
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT tblinventory.invId FROM tblinventory WHERE tblinventory.mid IN (".implode(',',$mids).") AND tblinventory.invReleased = 0 ORDER BY rand()";
$result = $conn->query($sql);
echo $sql;
$conn->close();
Result:
SELECT tblinventory.invId FROM tblinventory WHERE tblinventory.mid IN (11,10,20) AND tblinventory.invReleased = 0 ORDER BY rand()
1227
1339
2734
1372
516
1681
... etc