Interbase BLOB problem
| From: | David Russell | Date: | Tue, 29 Oct 2002 11:55:35 +0000 |
| Subject: | Interbase BLOB problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22779@lists.php.net to get a copy of this message | ||
Hi all,
I have a file I need to insert into a blob in a interbase table. Code as
follows:
$filehandle = fopen($file, "r");
$blob_id = ibase_blob_import($filehandle);
$qry = "INSERT INTO BPFATTACHMENTS ";
$qry = $qry . "(BPFATTACHMENTNO, BPF, ATTACHMENTTYPE, FILENAME,
FILESIZE, ATTACHMENT)";
$qry = $qry . "VALUES";
$qry = $qry . "($bpfAttNo, $BPFNo, $AttachmentType, '$file_name',
$file_size, ?);";
$res = ibase_query($qry, $blob_id);
I have a ibase_pconnect prior to this.
The problem is that is only adds a tiny part of the file (ie 5k of the
200k file) What should I be looking for?
Thanks
David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250
Fax: +2711 444-7256
e-mail: DavidR@BarloworldOptimus.com
web: www.BarloworldOptimus.com
Attachment: [application/x-pkcs7-signature] smime.p7s
Attachment: [application/x-pkcs7-signature] smime.p7s