Skip to content

Commit 3062e8f

Browse files
authored
Update README.md
1 parent 8e39e25 commit 3062e8f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ while ($record = $table->nextRecord()) {
3535
If 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

4146
It 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
97102
use 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);

0 commit comments

Comments
 (0)