Subject | Re: [firebird-php] working w/ blobs |
---|---|
Author | Jochem Maas |
Post date | 2005-08-04T14:03:54Z |
Albert wrote:
a while back (which nobody was interested in ;-):
http://iamjochem.com/fbird.php.db.zip
which will show you how the _guy_that_wrote_the_ibase_extension_ likes
to deal with blob fields (not that he does alot of php of late, he's
too busy get dirty with some deep-peer2peer-black magic :-).
<snip from="a previous email, of mine, to this list">
you will 'need' to do/realise/engage the following:
1. change a couple of require_once statements to 'match'
whatever include_path you may or may not be using.
2. READ THE CODE. it's not a lot.
3. realise that some of the functionality present is specific
to further data abstraction layers I have - the functionality is
non-invasive - but means a few unused lines of code are being parsed,
actually the hooks are quite easy to use.
4. don't underestimate the power inherent in the DB::query()
function (in terms of the way you can pass args).
5. there are instructions at the top of DB.class.php on
creating a 'DBConfig' Class (which is nothing more than defining
a few class constants in a class named DBConfig)
6. I am not the author, I'm just the guy who has been refining,testing
& using the code for almost as long as the
php5 implementation of the ibase extension has been running
(around php5 beta3).
7. I might have missed a few dependencies which are only relevant to my own
code - at most undefined constants, which are easy to fix.
8. I never use the Blob class. that said its very simple so shouldn't
be a problem.
9. all your code should really occur inside a main try/catch block (atleast).
10. I only use firebird1.5, (1.0 might not behave the same with regard to
firebird exceptions).
11. if you end up using it you'll probably want to change the DB::conn()
implementation - something I keep meaning to do myself.
12. have fun, questions welcome :-)
13. unlucky for some. I discussed making this code and other stuff written
by Ard and myself GPL/OS or whatever and he was into it... I just haven't
got round to doing anything much about.
14. this might be a silly list.
</snip>
> Hi all,I posted a copy of the 'lightweight' wrapper classes I use for firebird
>
> I need to pass some entries from a database to another. Basically, I execute
> a select and then an insert on the new one.
>
> The problem comes with the BLOB fields, I don't know how to process them,
> I've tried some of the php doc examples with no success at all.
>
a while back (which nobody was interested in ;-):
http://iamjochem.com/fbird.php.db.zip
which will show you how the _guy_that_wrote_the_ibase_extension_ likes
to deal with blob fields (not that he does alot of php of late, he's
too busy get dirty with some deep-peer2peer-black magic :-).
<snip from="a previous email, of mine, to this list">
you will 'need' to do/realise/engage the following:
1. change a couple of require_once statements to 'match'
whatever include_path you may or may not be using.
2. READ THE CODE. it's not a lot.
3. realise that some of the functionality present is specific
to further data abstraction layers I have - the functionality is
non-invasive - but means a few unused lines of code are being parsed,
actually the hooks are quite easy to use.
4. don't underestimate the power inherent in the DB::query()
function (in terms of the way you can pass args).
5. there are instructions at the top of DB.class.php on
creating a 'DBConfig' Class (which is nothing more than defining
a few class constants in a class named DBConfig)
6. I am not the author, I'm just the guy who has been refining,testing
& using the code for almost as long as the
php5 implementation of the ibase extension has been running
(around php5 beta3).
7. I might have missed a few dependencies which are only relevant to my own
code - at most undefined constants, which are easy to fix.
8. I never use the Blob class. that said its very simple so shouldn't
be a problem.
9. all your code should really occur inside a main try/catch block (atleast).
10. I only use firebird1.5, (1.0 might not behave the same with regard to
firebird exceptions).
11. if you end up using it you'll probably want to change the DB::conn()
implementation - something I keep meaning to do myself.
12. have fun, questions welcome :-)
13. unlucky for some. I discussed making this code and other stuff written
by Ard and myself GPL/OS or whatever and he was into it... I just haven't
got round to doing anything much about.
14. this might be a silly list.
</snip>