From 7f5a6199520801480b533094afd665bcdcadd34c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 30 Mar 2006 15:53:42 +0000 Subject: [PATCH] - added much more documentation including an example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@210410 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../paradox/functions/px-insert-record.xml | 99 ++++++++++++++++++- 1 file changed, 96 insertions(+), 3 deletions(-) diff --git a/reference/paradox/functions/px-insert-record.xml b/reference/paradox/functions/px-insert-record.xml index f0bb855122..027bdf02f6 100644 --- a/reference/paradox/functions/px-insert-record.xml +++ b/reference/paradox/functions/px-insert-record.xml @@ -1,5 +1,5 @@ - + @@ -14,6 +14,37 @@ resourcepxdoc arraydata + + + Inserts a new record into the database. The record is not neccesarily + inserted at the end of the database, but may be inserted at any + position depending on where the first free slot is found. + + + The record data is passed as an array of field values. The elements in + the array must correspond to the fields in the database. If the array + has less elements than fields in the database, the remaining fields + will be set to null. + + + Most field values can be passed as its equivalent php type e.g. a long + value is used for fields of type PX_FIELD_LONG, PX_FIELD_SHORT and + PX_FIELD_AUTOINC, a double values is used for fields of type + PX_FIELD_CURRENCY and PX_FIELD_NUMBER. + Field values for blob and alpha fields are passed as strings. + + + Fields of type PX_FIELD_TIME and PX_FIELD_DATE both require a long + value. In the first case this is the number of milli seconds since + midnight. In the second case this is the number of days since 1.1.0000. + Below there are two examples to convert the current date or timestamp + into a value suitable for one of paradox's date/time fields. + + + + This function is only available if pxlib >= 0.6.0 is used. + + @@ -32,8 +63,8 @@ data - Associated array containing the field values as returned by - px_retrieve_record. + Associated or indexed array containing the field values as e.g. + returned by px_retrieve_record. @@ -57,6 +88,68 @@ + + &reftitle.examples; + + + Set the date/time fields in a paradox database to the current + date/time + + +]]> + + &example.outputs; + + + + + + + + The julian day count as passed to jdtogregorian + has a different base of 1.1.4714 b.c. and must therefore be calculated + by adding 1721425 to the day count used in the paradox file. Turning the + day count into a timestamp is easily done by multiplying with 86400000.0 + to optain milli seconds. + + + + + &reftitle.seealso; + + px_update_record + +