Re: Manipulating Blob Fields
| From: | julian | Date: | Thu, 14 Feb 2008 08:47:22 +0000 |
| Subject: | Re: Manipulating Blob Fields | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44600@lists.php.net to get a copy of this message | ||
Hi Alan,
Sorry not writing to help you out.
I am trying to do something like you, but with pdf files. I am no expert on mysql but I just can't manage to store a pdf file in a blob field.
Any hints or experiences to share ??
I use a sequence of prepared statements, no rocket science precisely.
$stmt=$db->prepare("UPDATE
julian2.inscripcion SET resguardo=? WHERE inscripcion.id=3 limit 1");
if($stmt==false){
throw new Exception("error prepare database",200);
}
$stmt->bind_param("b",$pdfdata);
$ret=$stmt->execute();
No errors, warning, nothing. At the end however, there is no data in the field.
I am using php 5.2 and MySql 5
Any help appreciated.
Thanks.
JCG