You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I have the following problem.
This is my sql database table:
| id | record_id | from | num | qty | qty2 | to | | 150 | 34 | 111 | 200006 | 555.000 | 5550.000 | 222 |
When I try to write this data in dbf the value of the column qty2 is inserted as 5.000. The problem is present when the value is more than 999.000 (has 4 numbers before the decimal). If the value is 9000.000 it is written as 9.000. The script is taking only the first digit of the number. The header (with type) of the dbf colum qty2 is qty,N,14,3
I found something. I opened the dbf with linux dbfviewer and found that the numbers are written but there is an comma sign which is dividing thousands. The number is written as 5,550.000 instead of 5555.000 and the software (windows client and Libreoffice in Linux) is showing it as 5,000
Can you tell me where to change this thousands separator, please?
Hi! I have the following problem.
This is my sql database table:
| id | record_id | from | num | qty | qty2 | to |
| 150 | 34 | 111 | 200006 | 555.000 | 5550.000 | 222 |
When I try to write this data in dbf the value of the column qty2 is inserted as 5.000. The problem is present when the value is more than 999.000 (has 4 numbers before the decimal). If the value is 9000.000 it is written as 9.000. The script is taking only the first digit of the number. The header (with type) of the dbf colum qty2 is qty,N,14,3
I'm using this code to write the dbf:
$table = new WritableTable($files_path.'/file.dbf', null, 'CP1251');
$table->openWrite();
$lines = Records::all();
foreach ($lines as $line) {
$record = $table->appendRecord();
$record->from = $line->from;
$record->num = $line->num;
$record->qty = $line->qty;
$record->qty2 = $line->qty2;
$record->to = $line->to;
$table->writeRecord();
}
$table->close();
Any advice on how to solve this will be much appreciated. Thank you!
The text was updated successfully, but these errors were encountered: