Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

px_set_blob_file(3) [php man page]

PX_SET_BLOB_FILE(3)													       PX_SET_BLOB_FILE(3)

px_set_blob_file - Sets the file where blobs are read from

SYNOPSIS
bool px_set_blob_file (resource $pxdoc, string $filename) DESCRIPTION
Sets the name of the file where blobs are going to be read from or written into. Without calling this function, px_get_record(3) or px_retrieve_record(3) will only return data in blob fields if the data is part of the record and not stored in the blob file. Blob data is stored in the record if it is small enough to fit in the size of the blob field. Calling px_put_record(3), px_insert_record(3), or px_update_record(3) without calling px_set_blob_file(3) will result in truncated blob fields unless the data fits into the database file. Calling this function twice will close the first blob file and open the new one. PARAMETERS
o $pxdoc - Resource identifier of the paradox database as returned by px_new(3). o $filename - The name of the file. Its extension should be .MB. RETURN VALUES
Returns TRUE on success or FALSE on failure. PHP Documentation Group PX_SET_BLOB_FILE(3)

Check Out this Related Man Page

PX_CREATE_FP(3) 														   PX_CREATE_FP(3)

px_create_fp - Create a new paradox database

SYNOPSIS
bool px_create_fp (resource $pxdoc, resource $file, array $fielddesc) DESCRIPTION
Create a new paradox database file. The actual file has to be opened before with fopen(3). Make sure the file is writable. Note Calling this functions issues a warning about an empty tablename which can be safely ignored. Just set the tablename afterwards with px_set_parameter(3). Note This function is highly experimental, due to insufficient documentation of the paradox file format. Database files created with this function can be opened by px_open_fp(3) and has been successfully opened by the Paradox software, but your milage may vary. PARAMETERS
o $pxdoc - Resource identifier of the paradox database as returned by px_new(3). o $file -File handle as returned by fopen(3). o $fielddesc - fielddesc is an array containing one element for each field specification. A field specification is an array itself with either two or three elements.The first element is always a string value used as the name of the field. It may not be larger than ten characters. The second element contains the field type which is one of the constants listed in the table Constants for field types. In the case of a character field or bcd field, you will have to provide a third element specifying the length respectively the precesion of the field. If your field specification contains blob fields, you will have to make sure to either make the field large enough for all field values to fit or specify a blob file with px_set_blob_file(3) for storing the blobs. If this is not done the field data is truncated. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Creating a Paradox database with two fields <?php if(!$pxdoc = px_new()) { /* Error handling */ } $fp = fopen("test.db", "w+"); $fields = array(array("col1", "S"), array("col2", "I")); if(!px_create_fp($pxdoc, $fp, $fields)) { /* Error handling */ } px_set_parameter($pxdoc, "tablename", "testtable"); for($i=-50; $i<50; $i++) { $rec = array($i, -$i); px_put_record($pxdoc, $rec); } px_close($pxdoc); px_delete($pxdoc); fclose($fp); ?> SEE ALSO
px_new(3), px_put_record(3), fopen(3). PHP Documentation Group PX_CREATE_FP(3)
Man Page

We Also Found This Discussion For You

1. Shell Programming and Scripting

Reading a file

Hi, I want to read a file whic is a data file with 3 fields and look for a perticular pattern and insert that record in to the data base. I'm trying like this it is not workin please some one help me for line in `cat file.out`; do Name="echo \$line | awk '{print $2}'" If ( Name -eq val)... (3 Replies)
Discussion started by: sekhar_sos
3 Replies