note 103624 added to function.px-set-blob-file
| From: | simon at centurioncomputers dot com dot au | Date: | Sat, 23 Apr 2011 03:23:35 +0000 |
| Subject: | note 103624 added to function.px-set-blob-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179102@lists.php.net to get a copy of this message | ||
I could not get the OO interface to set_blob_file() to work....
<?php
$fp = fopen("/home/httpd/vhosts/newjcs/SALLY.DB", "r");
$pxdoc = new paradox_db();
$pxdoc->set_blob_file('/home/httpd/vhosts/newjcs/SALLY.MB');
?>
.............................
Fatal error: paradox_db::set_blob_file(): Paradox database has not been opened or created when
setting the blob file
.............................
but worked nicely when called procedurally, so quick example to grab the images from a paradox DB ,
the field names you will have to change to suit.
<?php
$pxdoc = px_new();
$fp = fopen("/blah/SALLY.DB", "r");
px_open_fp($pxdoc, $fp);
px_set_blob_file($pxdoc,'/blah/SALLY.MB');
$numrecords=px_numrecords($pxdoc);
for($x=1;$x<=$numrecords;++$x){
$yaks=px_get_record($pxdoc,$x);
if($yaks['Picture']){
file_put_contents("/blah/ims/{$yaks['Val
No']}.bmp",$yaks['Picture']);
}
}
px_close($pxdoc);
px_delete($pxdoc);
fclose($fp);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 121.215.7.106
----
Manual Page -- http://www.php.net/manual/en/function.px-set-blob-file.php
Edit -- https://master.php.net/note/edit/103624
Del: integrated -- https://master.php.net/note/delete/103624/integrated
Del: useless -- https://master.php.net/note/delete/103624/useless
Del: bad code -- https://master.php.net/note/delete/103624/bad+code
Del: spam -- https://master.php.net/note/delete/103624/spam
Del: non-english -- https://master.php.net/note/delete/103624/non-english
Del: in docs -- https://master.php.net/note/delete/103624/in+docs
Del: other reasons-- https://master.php.net/note/delete/103624
Reject -- https://master.php.net/note/reject/103624
Search -- https://master.php.net/manage/user-notes.php