如何将数据(数据类型 BLOB)复制到另一个 table?

How to copy data (datatype BLOB) into another table?

我想将数据从 blob 复制到同一数据类型 blob 中的另一个 table,但它变成了

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '???q}??I=|(T???>?????77j{{???~?>O??i?:??Ѹ>??~ݻw??_????㷈???Q/?8l>? XW?c' at line 1

我发现,imageDesign因为数据太长而无法传输,因为如果数据只有1.7KiB,就可以传输。请帮助我完成我的 fyp 项目

$query = "SELECT * FROM cart where userID = '$user_id'";  
    $result = mysqli_query($con, $query);  
    $countOrd =  mysqli_num_rows($result);
    if(mysqli_num_rows($result) > 0)  
    {  
         while($row = mysqli_fetch_array($result))  
         {
             $productQuantity = $row["productQuantity"];
             $productID = $row["productID"];
             $productSize = $row["productSize"];
             $productColour = $row["productColour"];
             $designType = $row["designType"];
             $readymadeID = $row["readymadeID"];
             $imageDesign = $row["imageDesign"];

    $add_query ="INSERT INTO orders(userID,productID,productSize,productColour,orderQuantity,designType,readymadeID,imageDesign,orderPayment,orderStatus,orderDate,orderTime) values ('$user_id','$productID','$productSize','$productColour','$productQuantity','$designType','$readymadeID','$imageDesign','$payment','Pending','$orderDate','$orderTime')";
    $delete_query="DELETE from cart where userID='$user_id'";
    $add_query_result=mysqli_query($con,$add_query) or die(mysqli_error($con));
    $delete_query_result=mysqli_query($con,$delete_query) or die(mysqli_error($con));
    }}

Blob-Data 不能与 dynamic-adhoc-sql 一起使用(无论如何都要避免这种情况)。关于使用 blob 数据(和强制参数绑定)的非常好的指南: MySQL & Blob