PhpDig.net

What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.




ifx_blobinfile_mode

Name

ifx_blobinfile_mode — Sets the default blob mode for all select queries

Synopsis

void ifx_blobinfile_mode(mode);
int mode: BLOB input mode

Returns

Void

Description

BLOB's in an table are stored as pointers the actual data. Depending on how the BLOB data was stored when created with ifx_create_blob() , it may either be stored in memory or as a file pointer. When extracting the BLOB data from a table using a SELECT statement, the BLOB data ca be retrieved using ifx_get_blob() . However, the BLOB may be stored in either mode. Setting the BLOB mode using this function, explicitly sets the type of BLOB returned.

A setting of 0 saves BLOBs in memory, a setting 1 saves BLOBs to file.

This setting can also be hard coded in the PHP initialisation file.

Version

Since version 3.0.4 and 4.0

Example

Example 553. Set BLOB mode

$db = ifx_connect("stores7@ol","informix","informix");

$query = "select id, blobfield from testparams";
$result = do_query($query, $db);

// blob stored in memory
ifx_setblobinfile_mode(0')


while ($row = ifx_fetch_row($result)) {
   printf("%s %s<BR>", $row["id"], ifx_get_blob($row["blobfield"]));
}

ifx_free_result($result);

ifx_close($db);



PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.