0
한 테이블에서 'tipuranibasti'(한 열은 이미지 용 BLOB 타입) 행을 'puranibasti'에 복사하는 방법은 무엇입니까? 내 코드를 사용하여 모든 필드는 blob 필드 [이미지 필드]를 제외하고 puranibasti로 복사되었습니다.한 테이블에서 다른 테이블로 행을 복사하는 방법
blob 필드는 데이터베이스의 puranibasti 테이블에서 [BLOB - 0B]처럼 보입니다.
<?php
include ("connect.php");
[email protected]($_GET['id']);
[email protected]_query("select * from tipuranibasti where id = $id");
[email protected]_fetch_assoc($image);
[email protected]$image_row['name'];
[email protected]$image_row['date'];
[email protected]$image_row['msg'];
$image=addslashes(@file_get_contents($image_row['image']));
if(@mysql_query("insert into puranibasti values('','$name','$date','$msg','$image')"))
{
echo "image has been inserted successfully";
} else
{
echo "problem inserting the image";
}
?>
답장을 보내 주셔서 감사합니다 ... 작동하는 다른 쿼리를 사용했습니다 : puranibasti select '', name, date, msg, tipuranibasti의 이미지 ID = $ id – tabi