RE: [PHP] HELP, blobs in informix
| From: | Boaz Yahav | Date: | Tue, 04 Jul 2000 21:17:37 +0000 |
| Subject: | RE: [PHP] HELP, blobs in informix | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-4812@lists.php.net to get a copy of this message | ||
Why not go all the way? if it works add it to weberdev :)
Sincerely
berber
Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.
> -----Original Message-----
> From: richard@zend.com [mailto:richard@zend.com]
> Sent: Tuesday, July 04, 2000 4:53 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] HELP, blobs in informix
>
>
> In article <00070312234102.19603@math.unl.edu.ar>,
> martin@math.unl.edu.ar
> ("Martin A. Marques") wrote:
>
> > I have hard troble trying to understand how PHP works with
> blobs. especially
> > with the funtion ifx_create_blob, in which I can't
> understand the third
> > parameter. The manual says this:
> >
> > ifx_create_blob
> >
> > ifx_create_blob -- Creates an blob object
> >
> > Description
> >
> > int ifx_create_blob(int type, int mode, string param);
> >
> > Creates an blob object.
> >
> > type: 1 = TEXT, 0 = BYTE
> >
> > mode: 0 = blob-object holds the content in memory, 1 =
> blob-object holds
> the content in file.
> >
> > param: if mode = 0: pointer to the content, if mode = 1:
> pointer to the
> filestring.
> >
> > Return FALSE on error, otherwise the new blob object-id.
> >
> >
> > I don't understand the param (third) parameter. How is it?
> What should I put
> > there?
>
> I'm guessing that you either put a variable with a really
> long string in
> there (mode 0) or the path to a file (mode 1)
>
> At least, that's how I read it...
>
> Sample:
>
> $image = CreateGif();
> .
> .
> .
> $blob1 = ifx_create_blob(0, 0, $image);
>
> $blob2 = ifx_create_blob(0, 1, "/path/to/other/image.gif");
>
> $blob3 = ifx_create_blob(1, 0, "This is a chunk of text in RAM");
>
> $blob4 = ifx_create_blob(1, 1, "/path/to/text.txt");
>
> Disclaimer: I could be reading this entirely wrong...
>
> If it works, add my sample code to the user notes, okay?
> --
> Richard Lynch | If this was worth $$$ to you, buy a CD
> US Customer Support Director | from one of the artists listed here:
> Zend Technologies USA | http://www.L-I-E.com/artists.htm
> http://www.zend.com | (this has nothing to do with
> Zend, duh!)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>