Why is this blob saving when used as a concatenated string but not as a prepared statement I have a PHP mysqli prepared statement that looks like this:

$editSQL = "UPDATE tblClientReminders
              SET Header = ?, Notes = ?, DepartmentID = ?,
                  TierID = ?, RemindType = ?, RemindDate = ?, DateAdded = ?
              WHERE ReminderID = ?";
     $stmt = $conn-&gt;prepare($editSQL);
     $stmt-&gt;bind_param('sbiiissi', $input[1], $input[2], $input[3],
             $input[4], $input[5], $input[6],
             $DateAdded, $_SESSION[$thisTracker]);
     $DateAdded = date("Y-m-d h:i:s");
     $stmt-&gt;execute();
     $stmt-&gt;close();


When I run this, it executes without throwing any errors and runs everything else as expected; however, the "Notes" field is cleared even though $input[2] has content.  But when I do this using concatenation:

$editSQL = "UPDATE tblClientReminders
         SET Header = '".$input[1]."', Notes = '".$input[2]."',
             DepartmentID = '".$input[3]."', TierID = '".$input[4]."',
             RemindType = '".$input[5]."', RemindDate = '".$input[6]."',
             DateAdded = '".date("Y-m-d h:i:s")."'
         WHERE ReminderID = '".$_SESSION[$thisTracker]."'";
     $stmt = $conn-&gt;prepare($editSQL);       
     $stmt-&gt;execute();
     $stmt-&gt;close();


$input[2] is properly saved along with everything else.  I have verified that the column "Notes" is a blob in the mySQL database, and that $input[2] actually contains the intended data when I try the prepared statement.  So, why is $input[2] not saving in the first example, and how would I fix that.

The only other factor here I can think of is that $input[2] is passing an AES string, but I can't think of why that would be a problem since other queries elsewhere in my code are saving AES strings just fine, but I think this is the only one that does it to a blob.

An example of inputs:

$input[1] = 'test';
$input[2] = '8L2G1urlEQEjZdyMrSQeow==::88f32b3584167b1d7286a57f861d4fd6';
$input[3] = 1;
$input[4] = 3;
$input[5] = 0;
$input[6] = '2018-11-20';
$_SESSION[$thisTracker] = 15;
The bind_param page mentions (emphasis mine) for the types parameter that 


  corresponding variable is a blob and will be sent in packets


which is done in this manner:

$null = NULL;
$stmt-&gt;bind_param('sbiiissi', $input[1], $null, $input[3],
         $input[4], $input[5], $input[6],
         $DateAdded, $_SESSION[$thisTracker]);
$stmt-&gt;send_long_data(1, $input[2]);


If your BLOB data exceeds the max_allowed_packet size you will need to call send_long_data multiple times, sending a smaller fragment of it each time.

More info in this Oracle blog.