Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

px_new(3) [php man page]

PX_NEW(3)																 PX_NEW(3)

px_new - Create a new paradox object

SYNOPSIS
resource px_new (void ) DESCRIPTION
Create a new paradox object. You will have to call this function before any further functions. px_new(3) does not create any file on the disk, it just creates an instance of a paradox object. This function must not be called if the object oriented interface is used. Use new paradox_db() instead. RETURN VALUES
Returns FALSE on failure. EXAMPLES
Example #1 Opening a Paradox database <?php if(!$pxdoc = px_new()) { /* Error handling */ } $fp = fopen("test.db", "r"); if(!px_open_fp($pxdoc, $fp)) { /* Error handling */ } // ... px_close($pxdoc); px_delete($pxdoc); fclose($fp); ?> If you prefer the object oriented API, then the above example will look like the following. Example #2 Opening a Paradox database <?php $fp = fopen("test.db", "r"); $pxdoc = new paradox_db(); if(!$pxdoc->open_fp($fp)) { /* Error handling */ } // ... $pxdoc->close(); fclose($fp); ?> SEE ALSO
px_delete(3), px_open_fp(3). PHP Documentation Group PX_NEW(3)

Check Out this Related Man Page

PX_GET_RECORD(3)														  PX_GET_RECORD(3)

px_get_record - Returns record of paradox database

SYNOPSIS
array px_get_record (resource $pxdoc, int $num, [int $mode]) DESCRIPTION
PARAMETERS
o $pxdoc - Resource identifier of the paradox database as returned by px_new(3). o $num - The record number is an artificial number counting records in the order as they are stored in the database. The first record has number 0. o $mode - The optional $mode can be PX_KEYTOLOWER or PX_KEYTOUPPER in order to convert the keys of the returned array into lower or upper case. If $mode is not passed or is 0, then the key will be exactly like the field name. The element values will contain the field values. NULL values will be retained and are different from 0.0, 0 or the empty string. Fields of type PX_FIELD_TIME will be returned as an integer counting the number of milliseconds starting at midnight. A timestamp ( PX_FIELD_TIMESTAMP) and date ( PX_FIELD_DATE) are floating point respectively int values counting milliseconds respectively days starting at the beginning of julian calendar. Use the functions px-timestamp2string(3) and px-date2string(3) to convert them into a character representation. RETURN VALUES
Returns the $num'th record from the paradox database. The record is returned as an associated array with its keys being the field names. SEE ALSO
px_retrieve_record(3). PHP Documentation Group PX_GET_RECORD(3)
Man Page

We Also Found This Discussion For You

1. Programming

Opening a file during FTP

I need to process a file in real time as it is being FTPed from a remote server. In my test environment, I wrote a process that would: 1) Open the file - fopen(filename, "r") 2) Go to the offset where I left off on the previous itteration (fseek) 3) Read 2K blocks and append each block to a... (1 Reply)
Discussion started by: ceaker
1 Replies