File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,12 @@ while ($record = $table->nextRecord()) {
3535If the data in DB is not in UTF-8 you can specify a charset to convert the data from:
3636
3737``` php
38- $table = new Table('test.dbf', null, 'CP1251');
38+ $table = new Table(
39+ 'test.dbf',
40+ [
41+ 'encoding' => 'cp1251'
42+ ]
43+ );
3944```
4045
4146It is also possible to read Memos from dedicated files. Just make sure that * .fpt* file with the same name as main database exists.
@@ -96,7 +101,12 @@ Add new record
96101``` php
97102use XBase\WritableTable;
98103
99- $table = new WritableTable('file.dbf');
104+ $table = new WritableTable(
105+ 'file.dbf',
106+ [
107+ 'editMode' => WritableTable::EDIT_MODE_CLONE, //default
108+ ]
109+ );
100110$record = $table->appendRecord();
101111$record->set('name', 'test name');
102112$record->set('age', 20);
You can’t perform that action at this time.
0 commit comments