Changelog for the Php-Txt-Db-Api:
************************************************************************

------------------------------------------------------------------------
Please note that the order of this changelog is ASCENDING.
You will find the latest changes at the bottom! So don't just read
the first page an think "only SELECT Statemens are supported", there's
A LOT MORE STUFF SUPPORTED! The best place to see what's supported 
in the txt-db-api is the manual anyway!
------------------------------------------------------------------------


 0.0.1A:
========================================================================
-First Version
-Restrictions
	-only SELECT Statemens are supported
		-only "=" Operators supported
		-Table linking is supported
		-ORDER BY NOT support
		-Subquerys are NOT supported
-Errors
	-Columns in the ResultSet are not ordered as in the Sql Query ->
	 getCurrentValues and getValues do not work properly

-Warning:
	-Still VERY Alpha and not good tested
	 
	

 0.0.1:
========================================================================
-Added INSERT Statement Support ("VALUES" Type only)
-Added Support to Order Columns amog themself 
 (getCurrentValues and getValues do now work)
-Changed SqlParser internal structue
-Changed Database internal structue
-Otherwise this Version has the same Restrictions as above
-Still VERY BAD and unstructured ALPHA Code

 0.0.2:
========================================================================
-Added DELETE Statement Support
-Database Class
	-Lockfile (Multiple Users a the same time - Handling)

 0.0.3:
========================================================================
-Added ORDER BY Support

 0.0.4:
========================================================================
-Added UPDATE Support
-Fixed some Bugs in the Expression class

 0.0.5: 
========================================================================
-Added Support for the insert Type SET 
-ResultSet: append() will now initialize all Fields with "" or 0 
 (inc Fields are Increased)
-SqlParser: Some more Error checking (, expected)
-Added CREATE TABLE Statement
-Added .chm Manual (German only)

 0.0.6:
========================================================================
-Optimations
-ResultSet->dump() looks good now
-Some more Comments
-Finished .chm Manual
-Changed Folder structure


 0.0.7:
========================================================================
-Documentation updated


 0.0.8:
========================================================================
-Fixed some really big bugs
-Documentation updated (Errors fixed, New Tutorial)
-Added Support for "'" (Single Quote)
-explode_resp_quotes() can handel escape chars now
-removed a bug, which deleted the whole table on syntax errors
-some corrections in the help file
-added a site about escape characters to the help
-added support for > <, <=, >= in WHERE
-added a Help in HTML Format (not chm)

 0.0.9:
========================================================================
-Replaced some magic numbers and hardcoded strings with constants
-Fixed some Bugs

 0.1.0-Beta-01:
========================================================================
-Cleaned the whole Code Layout
-Added some Comments
-Fixed a bug which did Order the Rows wrong if no ORDER BY was used
-Added Support for table.* in the SELECT Statement
-The php-txt-db-api is now under GNU License (see License.txt)

 0.1.0-Beta-02:
========================================================================
-Changed the position of the License File
-Removed some Errors in the Manual
-fixed a Bug in ResultSet->appendRow() 
-fixed a Bug which parsed the ORDER BY wrong
-fixed some more Errors in the Manual (thx RiSC)
-fixed a Monster-Bug in the SELECT-Query
-fixed a Bug in the CREATE TABLE Statement which did handle # and % wrong !
-updated Tutorial 2

 0.1.0-Beta-03:
========================================================================
-fixed a Bug in the ORDER BY parsing
-manual updated 
-fixed a Bug which displayed an Error on correct DELETE Statements
-changed the wohle Table locking, it's more secure now
-fixed a Bug in the UPDATE Statement, which allowed only one Condition 
 in the WHERE Expression ("put Back"-Problem)
-changed the way the Rows are deleted in DELETE Statements

 0.1.0-Beta-04:
========================================================================
-added a "g_" to Global Vars
-created a new array for Comparison Operators 
-added Not Operators: != and <>
-manual updated (added some infos about floats)

 0.1.0-Beta-05:
========================================================================
-added an Index to de .chm Help File
-a BIG performance update for the "ORDER BY" (quicksortRows())

 0.1.0-Beta-06:
========================================================================
-manual changes

 0.1.1
========================================================================
-sience PHP 4.2.0 array_search() returns FALSE before 4.2.0 it was NULL
 this caused some Big Errors with PHP > 4.2.0, this Problems are fixed
 now
-changed ResultSet so that it is still compatible with Versions < 4.2.0
-added Informations to the Manual whit which PHP Version the API was
 tested
-added the function txtdbapi_version() and the constant TXT_DB_API_VERSION

 0.1.1a
========================================================================
-fixed some Errors in the Manual

 0.1.1b
========================================================================
-INSERT had a bug: if only one column was specified the String "Array" was 
 added => This bug is now fixed (Thx to deep:blue)
 
 0.1.1c
========================================================================
-the file database.php had a tabluator after the end (?>) which caused
 an error with header() calls: 
 "Cannot add header information - headers already sent by ...."
 this is fixed now, thanks to Wolfgang
 
 0.1.2-Beta-01
========================================================================
-Lester has corrected a big part of the english manual!
-(Beta) Jakob Wenkel and I added LIMIT Support for SELECT Statements, 
 use the following syntax: LIMIT [offset,] rows

 0.1.2-Beta-02 
========================================================================
-Added Support for CREATE DATABASE, DROP DATABASE, DROP TABLE and 
 LIST TABLES. The CREATE DATABASE and DROP DATABASE Statements must
 be executed on the Root-Database, which you can get with
 $db=new Database(ROOT_DATABASE);  
 
 0.1.2-Beta-03
========================================================================
-Updated the Documentation with the new Statements.
-$DB_DIR and $API_HOME_DIR can be set to relative paths (this worked
 also in earlier versions, I just didn't test it :) 
 But if you use relative paths, each project should have its own 
 txt-db-api.php file, in the project path. Then this project specific
 txt-db-api.php file can contain relative paths in DB_DIR and API_HOME_DIR.
 But, like before, you can even use just one txt-db-api.php file, placed in
 the folder of the txt-db-api, with DB_DIR and API_HOME_DIR set to absolute 
 paths. Do what you like. (Thanks to jens rauschning for the input!!)
-The documentation (installation) has been updated with infos about relative
 and absolute paths.
-Added a News Page to the manual (which doesn't contain much in the english
 Manual Version, sience this Changelog is english)
-0.1.2-Beta-03 was tested (a bit) with PHP 4.3.0... it seems to work..
-Bugfix: in INSERT-Statements the keywords "VALUES" and "SET" did only work
 in upper-case, its fixed now

 0.1.2-Beta-04
========================================================================
-Added support for DISTINCT (experimental) (thx to mario)
-Added support for GROUP BY (experimental) (thx to mario)

 0.1.2-Beta-05
========================================================================
-Bugfix: If you had whitespaces after the ; in Statemens which used 
 a WHERE (UPDATE and DELETE Statemens only) the ; was used as Part of 
 the WHERE Expression. Its fixed now. Thanks to Armin Gelhausen for 
 the Bug Report! 
 
 0.1.2-Beta-06
========================================================================
-Added LIKE support. I haven't tested it very well so it may not work in all 
 cases, report bug's if you find any please! The only supported wildcard is *.
 It has the same meaning as the % from the SQL Standard (i think...).
-The 2 Examples/Tutorials are translated (but not yet corrected) to english now
 
 0.1.3-Alpha-01
========================================================================
-Please note that this is an alpha version. Use it only for testing, 
 better stay with the older beta's for your productive website.
-Changed the way the Tables are read and written by INSERT Statements,
 making INSERT faster, especially for big tables. The INSERT performance
 doesn't drop anymore if a table get's bigger.
-Added a new User Setting in const.php: $LIKE_CASE_SENSITIVE. If set to 1
 LIKE is case sensitive, else LIKE is case insensitive
-There isn't a limit for the record size anymore. The setting RECORD_MAX_SIZE
 was removed. There's a new setting (constant) in const.php: ASSUMED_RECORD_SIZE.
 It does NOT limit the size of a record. It's just an internal used value. 
 Don't set it to <1! However, choosing the value of ASSUMED_RECORD_SIZE wisely 
 can make INSERT really faster. Set the value to something more then the average 
 size of your records. If in doubt, just leave the default value!!
-Fixed a bug in the SQL-Parser: when the SQL Statement contained the string like
 in a word (for example "SELECT * from liketable" it was interpreted as the 
 keyword LIKE.
-The wildcard for LIKE is now %, as in the SQL Standard.
-LIKE can now also be used to search for the LIKE-wildcard %. You have to escape
 it with a \  "SELECT * FROM myTable WHERE column LIKE '%test\%test%'"
 This example finds xxtest%testxx but not xxtestAtestxx.
-Replaced the SQL Parser with a configurable Parser which is also usable for other
 tasks. Its the idea to replace util functions like explode_resp_quotes with this
 parser later. There's a new file: stringparser.php
-str_replace_expect_escaped() replaced with StringParser functions
-explode_resp_quotes*() functions replaced with StringParser functions
-thanks to the new parser, the escaping is sometimes much simpler. however the old
 rules as seen in the manual should still work.
-translated the FAQ page to english


 0.1.3-Alpha-02
========================================================================
-ATTENTION: THE TABLE FORMAT CHANGED IN VERSION 0.1.3-Alpha-02! 
 WHEN A # IS PART OF A VALUE IT ISN'T STORED AS %# ANYMORE, 
 IT'S STORED AS %h NOW !! TO CONVERT YOUR OLD TABLE FILES JUST
 OPEN IT IN A TEXT EDITOR AND SEARCH FOR %# AND REPLACE IT WITH %h.
 TAKE CARE NOT TO REPLACE %%# WITH %h, BECAUSE THIS HAS A DIFFERENT MEANING
 IN THE OLD FORMAT (THE % IS ESCAPED WITH % RESULTING IN A 
 SINGLE % AND # IS A NORMAL VALUE DELIMITER IN THIS CASE!)
 ALSO % ISN'T STORED AS %% ANYMORE, IT'S STORED AS %p NOW, DO THE SAME AS
 ABOVE TO CONVERT OLD TABLE FILES.
 ALSO, THE # AT THE END OF EACH LINE MUST BE REMOVED!
 
-Please note that this is an alpha version. Use it only for testing, 
 better stay with the older beta's for your productive website.
-Fixed some code errors, which caused warnings and infos messages in
 alpha-01
-api was tested with the new php 4.3.1 (not a big deal, its only a security
 update)
-the links in the html manual didn't work because on *nix machines because
 windows slashes where used in the generated index.html file, its fixed now
 thanks to deep:blue for the bug report.
-Some LIKE performance optimizations (str[i]str is used when it is a %string% LIKE)
 thanks to mario
-Changed the way tables are read, this changes increase all table reads and this
 results in great performance increases for the whole txt-db-api, thanks to
 Sam Thursfield!
-Some WHERE performance optimizations, made by mario, making it up to 5 times faster!
 
 0.1.3-Alpha-03
========================================================================
-changed the ASSUMED_RECORD_SIZE default value to 30. It was still set to
 10 from some tests. Its still the best solution to set this value at your
 own to the avg record size.
-updated the manual to the latest with changes
-Fixed a terrible bug: the new StringParser was wrong integrated into the 
 DELETE and UPDATE parsing code, which caused UPDATE and DELETE to work wrong 
 (DELETE removed all records from the table!!)
 Don't use alpha-01 and 02 (expect you want to loose your tables ;) )
 
 0.1.3-Alpha-04
========================================================================
-LIMIT with only 1 Paremeter (without offset) didn't work with GROUP BY
 or DISTINCT, it's fixed now.
-DISTINCT or GROUP BY in combination with LIMIT and ORDER BY didn't work 
 correctly, should be fixed now.
-more good performance optimizations, affecting all statements!! 
 here are some performance tests: http://www.codeforum.ch/viewtopic.php?t=364
-USE ONLY UNIX NEWLINES IN THE NEW TABLE FORMAT! (If you edit tables by yourself
 use a good text editor like ultraedit to convert the newlines to unix)
 
 0.1.3-Alpha-05
========================================================================
-LIMIT performance optimizations (the old solution was really slow)
-some GROUP BY/DISTINCT in combination with LIMIT and ORDER BY 
 optimizations
-added a new function to RestultSet: getCurrentValuesAsHash(),
 it returns the current row as hash array, which can be read like this:
 $values['colName']

 0.1.3-Alpha-06
========================================================================
-LIST TABLES didn't reset() the ResultSet, so the user had to do it himself,
 should be fixed now.
-Made some error messages look a bit nicer...
-Newlines and tabulators are handled as correct whitespaces now, so you can
 write SQL Queries over multiple lines.
-added some important infos to the manual.
-some little performance optimizations
 
 0.1.3-Alpha-07
========================================================================
-LOL :) I only make releases that quick because I have no cvs at the moment
 and some users need bugfixed versions
-ORDER BY caused some warnings when applied to an empty result, fixed now.

 0.1.3-Alpha-08
========================================================================
-Changed error handling a bit. If you set the $PRINT_ERRORS/$PRINT_WARNINGS
 Settings in const.php to 0, the txt-db-api will not print out any errors.
 Also Database has some new functions: errorOccurred() and getLastErrors()
 to check for errors and receive them.
-The Keywords WHERE, GROUP BY, ORDER BY and LIMIT can be used with LIST 
 TABLES now.
-Added a new Setting in const.php: ORDER_CASE_SENSITIVE.
 If $ORDER_CASE_SENSITIVE is 0, ORDER BY is case insensitive if
 $ORDER_CASE_SENSITIVE is 1, ORDER BY is case sensitive
 
 0.1.4-Beta-01
========================================================================
-The latest alpha seems to work fine, so the api has beta status now.
 Please note that this should be the most stable version of the api at 
 the moment. The old versions without "-Beta" like "0.1.1" aren't more
 stable. I just had another versioning convention in early developement.
-Windows (\r\n==\xd\xa) and Unix (\n==\xa) newlines are supported now.
 Please note that the txt-db-api still only writes Unix newlines, but
 tables which contain Windows newlines are also read correctly now.
 MAC (\r==\xd) Users should convert their text files, to use another 
 newline format.
 
 0.1.4-Beta-02
========================================================================
-Tested with PHP 4.3.2RC1
-This is just a little "bugfix"-release (see below). There's no need to
 update if Beta-01 works fine on your machine/webserver.
-Changed the mode for every fopen() call to use "b" (binary)
 If you get errors you didn't get in 0.1.4-Beta-01, please report it!
 You can use still use the "old" fopen mode by modifying const.php at
 line 67: define("TABLE_FILE_OPEN_MODE","");
 
 0.1.5-Alpha-01
========================================================================
-Renamed the DEBUG constant to TXTDBAPI_DEBUG, to make the api more 
 compatible with other scripts.
-Added a second "verbose" Debug mode. (Not a User-Setting)
-Added Infos about the User Settings in const.php to the manual
-Added a list of reserved words and chars to the manual
-Aliases for Tables are supported now: SELECT * FROM table AS tableAlias
-THE TABLE FORMAT CHANGED AGAIN: The third line in the Table-Files
 contains the Default-Values for the columns now. Also the CREATE TABLE
 Statament supports the Keyword DEFAULT now, to set this Default-Value.
 (See Manual).
-Some other Manual cleanups..
-Many code cleanups (better var names, etc...) => This could lead to errors!

 0.1.6-Beta-01
========================================================================
-Fixed a bug in the INSERT Statement, it didn't work with tables
 which had only 1 column. (thanks to Vinc for reporting this bug)
-INSERT did not work on very specific table sizes, a really annoying bug,
 plase update to 0.1.6-Beta-01, this bug should be fixed now!
 
 0.2.0-Alpha-01
========================================================================
-Large redesign to add functions support to the Txt-Db-Api 
-Easier SQL query syntax (see next line).
-You can now use columns in WHERE, ORDER BY and GROUP BY which aren't
 listed after SELECT. The columns just have to be in one of the tables which
 are in the FROM part.
-Added support for the following functions (SELECT, INSERT, UPDATE, DELETE only): 
 UNIX_TIMESTAMP, MD5, NOW, ABS, LCASE (or LOWER), UCASE (or UPPER)
 Functions can also be used in WHERE, GROUP BY and ORDER BY, 
 even if this function was not listed after SELECT.
-Fixed a bug with GROUP BY and DISTINCT (if you had two records like this:
 foo#bar and foob#ar and grouped for both columns so GROUP BY worked wrong)
-Added support for the following grouping functions (SELECT only): 
 MIN, MAX, COUNT, SUM, AVG
-Renamed print_error and print_warning to print_error_msg and print_warning_msg
 to make the text-db-api more compatible with phpcms.
-Replaced every &new with new. It seems to be more compatible with older 
 php versions and its not slower according to the php manual.
-StringParser works with a cache now, so elements aren't parsed more then 
 once when peeking. This makes parsing SQL Statements a bit faster.
-Removed some old unsafe functions like findColNr()
-In the WHERE part you can now use 'value'='value' and 'value'=column 
 (without '' if the value is a number)
-functions can also be applied directly to values now, for example md5('foo')
-I've tested the smallest PHP Version which is needed for the text-db-api, 
 and it seems to be PHP 4.1.0.
-Added a function getLastInsertId() to Database. It returns the value of the 
 first inc column of the row added by the last INSERT Statement.
-Changed the error handling. The error functions where removed from Database
 and are now public functions. You can use txtdbapi_error_occurred(),
 txtdbapi_get_last_error() and txtdbapi_get_error() to check for errors
 and retrieve them.
-If you set PRINT_ERRORS to 0, you won't see PHP Error Messages (or Warnings)
 anymore from executeQuery(). All Errors (including PHP Errors which occur in 
 executeQuery) will be available through txtdbapi_get_last_error() and 
 txtdbapi_get_errors(). This makes it possible to hide any errors from 
 visitors and enables you to display your own error message.
 This ONLY applies to the function executeQuery() (But this should be enough!)
-Some performance optimizations from Mario. Especially ORDER BY should be faster now.
-UPDATE statements which had no WHERE returned 1 in the past. This
 wasn't corret, it returns the number of affected rows (all) now.
-In UPDATE Statements you can now also assign the value of a column
 to other columns (you can also use col1=func(col1) )
-Changed the return values of executeQuery() for all Statements to false 
 if an error occurred (it was null on some Statements).

 0.2.0-Alpha-02
========================================================================
-Floating point values did not work correctly, its fixed now

 0.2.0-Alpha-03
========================================================================
-String values containing a '(' where interpreted as functions, should be fixed now
-Fixed a little typo
-PHP 4.3.2RC2 has a bug with default parameters which are -1, so the api will
 not work correctly with 4.3.2RC2. Use 4.3.1 instead.

 0.2.1-Beta-01
========================================================================
-getRowSize should now also work with empty tables.
-stepan sent me some very good performance optimizations for LIKE, they
 make LIKE tremendously faster now, thanks.
-The wildcard _ is now also supported in LIKE.
-There was not one bug report for 0.2.0-Alpha-03 ?!?! So if you found
 a bug in alpha-3, and think it has allready be found: nope, i hasn't,
 so please report bugs in alpha3 or this version, thanks!

 0.2.2-Beta-01
========================================================================
-Tried to optimize memory usage
-The txt-db-api is now under a BSD license (Versions >= 0.2.2-Beta-01)
-getCurrentValuesAsHash() returns uses now the alias if there is one
 for a column (thx Mario)

 0.3.0-pre01
========================================================================
-New (better) file locking (Mario)
-INC/DEC (Mario)
-Make Text Db Api PHP5 compatible (Mario)
-NOT LIKE operator (mindlord)
-fixed a bug in the parser (causing wrong table files with 0 as default
 value in CREATE TABLE Statements)
-All PHP5 Users need to disable E_STRICT or they will get warnings!
 I Cannot fix this, because fixing this (change var to public) would
 make the txt-db-api incompatible with PHP4.
-Added EVAL() Function. This makes statements like
 SELECT nr1, nr2, EVAL(nr1+nr2) FROM bla; AND
 UPDATE bla SET nr1=nr1+10; possible
 Please note, if you want to use brackets you have to put the expression
 in ' ' or " ", for example EVAL(' (nr+nr2)*3')
-Using INSERT without column list and providing less values then
 there are columns caused corrupt table files. Also the default values
 where not used. Should be fixed now and default values are used.
 But please note that using INSERT Statements without Column List
 and less/more values then columns make no sense and should be avoided!
 Using more values then there are columns will still produce corrupt
 tables. But such statements make really no sense.
-Attaching aliases to Functions without column parameter didn't work.
 For Example SELECT NOW() as currentTime; didn't work. Fixed now.
-Its now possible to define another column seperator than #. Just set
 the constat COLUMN_SEPARATOR_CHAR in const.php to another character.
 Plase note that you cannot create a table with one seperator and
 query/update it with another.
-Gobo's WebGUI will now be integrated in the Text-db-api download.

 0.3.0-pre02 - 0.3.0-pre05
========================================================================
-Fixed some (PHP5) bugs 
-added Italian and Dutch language for the address book example 
 (Danny van der Weide)
-Manual updated (security info, .htaccess files)

 0.3.1-Beta-01
========================================================================
-Added support for IN and NOT IN (numbers and strings)
-Fixed a bug which caused an error message on the first INSERT into
 an emtpy table with one field and no default value for this field
-Added support for JOINS (INNER, LEFT [OUTER], RIGHT [OUTER])
-Support for PEAR (DB). Thanks to Mario. (See the PEAR Section in
 the manual)
-The tbedit script (a table file editor) is now included in the zip.
 It can be startet by the url webgui/tbedit.php or from a link
 in the webgui.
-Added support for COUNT(*) and COUNT(table.*) SELECT queries
-Fixed a bug in the installer script which caused a cryptic text in 
 the webgui (Mario)
-Updated Installation manual page (included infos abount installer.php)
 

