ptb_append
Appends table from $filename at the end of connected $database. If first field of both databases is id and no $keyField is used, then id of appended database is renumbered, starting from the biggest value of $database's id plus 1. Identity of two databases' structure (ie. field names and number) is not checked. If $database is not an array, the other one (being appended) is returned.
Syntax
$var = ptb_append($database, $filename[, $location = PTB_DEFAULT_DB_LOCATION[, $recursive = true[, $keyField = '']]]);
Syntax description
- $database
- variable containing connected database
- $filename
- name of file containing the database to be appended
- $location
- optional: location of $filename; can be:
- G
- globally defined (in ptb_ini.php) directory
- L
- local directory (ie. the same where script calling ptb_connect is placed)
- <path>
- other, defined directory, eg. /samples/db (no trailing slash)
- F
- filename (ie. absolute or relative path without DOCUMENT_ROOT dependency)
- $recursive
- optional: specifies whether linked fields should be read; can be set to true (default) or false
- $keyField
- optional: see ptb_connect for description; should be used if $database was connected to with the same $keyField
Return
This function returns array on success and null (=false) on failure.