History
- new
- corrected
1.2 (June 20th, 2007)
- ptb_connect can use 4th argument: $keyField with fieldname to be treated as main key of the connected table–thanks go to Wayne from Team Wishbone for encouraging me to do it at last
- ptb_map with two arguments returns whole record
- ptb_add now accepts array as third argument (can be multidimentional, eg. $var[3]); order of fields is not checked!
- new function: ptb_fieldnames
- new constant: PTB_VERSION
- settings from ptb_ini.php are now read one by one, which means that you can put there only those that differ from default ones
- error messages are now divided into three parts: syntax (always fatal), file and database structure (which can be switched off)
- functions that write to files (ptb_create, ptb_add, ptb_update, ptb_delete, ptb_write, ptb_addField, ptb_delField and ptb_changeFieldname) now return true on success and null (=false) on failure, so you can take appropriate action in case write failed:
if (!ptb_create('country.php', 'L', 'id|country|capital')) { echo 'Cannot create file.'; // email yourself or whatever }
- ptb_select, ptb_max and ptb_min on empty database returned 0; now it is null
- function ptb_changeFieldName was renamed to ptb_changeFieldname
- function ptb_connect no more uses realpath, since it is blocked on some servers, so one is unable to use this function with L switch; besides it didn't seem to give any real advantage; thanks go to Evert Everts
- some other small bugs were corrected
1.1 (November 22nd, 2006)
- more informative error messages
- ptb_count now accepts second argument: $condition
- new option for data file location: F (absolute or relative path without DOCUMENT_ROOT dependency) – thanks go to João Nuno de Oliveira e Silva for the idea
- additional check for the proper use of $condition
- in ptb_connect extension of linked file (thru link or multi field) was being determined improperly, when path contained dot
- if multi field was empty, linked field had improper value
- in ptb_update one couldn't insert values with equal sign or comma; now $update is parsed in a way that makes it possible
- some other small bugs were corrected
1.0 (July 24th, 2006)
Initial release.