Project

General

Profile

Actions

Bug #29524

closed

TCA returns silly values when using "real" as field type

Added by Anonymous about 13 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2011-09-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
float
Complexity:
Is Regression:
Sprint Focus:

Description

Hi there,

there is some fancy bug when using dbal with MSSQL.

If you have a field, let's call it "rate", in the database and this field is of type "real", which seems to corresponds to float or double in MySQL, the return value of the database gets some kind of modified.

For example, you enter 6.95 in the field and save it. The value get's correctly saved to the database : 6.95. But when the form loads, the value looks more like 6.9499998092651 . When checking again the value in the database, it is still 6.95. When you save again with 6.95 there is a error message claiming that the field type doesn't fit.

Now the question is : why does dbal (or TYPO3) harm the content?

I checked it with a normal mssql_query and the value gets returned correctly, means 6.95.

Thanks for you help and support.

Greets Tizian

Actions #1

Updated by Jonas Felix about 13 years ago

Tizian Schmidlin wrote:

For example, you enter 6.95 in the field and save it. The value get's correctly saved to the database : 6.95. But when the form loads, the value looks more like 6.9499998092651 . When checking again the value in the database, it is still 6.95. When you save again with 6.95 there is a error message claiming that the field type doesn't fit.

Isn't this a problem of the PHP integrated Math library? What is it if you directly from Database?

Actions #2

Updated by Anonymous about 13 years ago

Please read the entire post:

"I checked it with a normal mssql_query and the value gets returned correctly, means 6.95."

Although I've got an update about this, appearently this doesn't happen on an other installation of ours with the development system of the same website, so this bug can be closed and status may be set as "Non-lieu".

Greets Tizian

Actions #3

Updated by Xavier Perseguers about 13 years ago

  • Status changed from New to Closed
Actions #4

Updated by Michael Stucki almost 11 years ago

  • Project changed from 329 to TYPO3 Core
  • Category deleted (MS SQL Server)
Actions #5

Updated by Michael Stucki almost 11 years ago

  • Category set to 999
Actions

Also available in: Atom PDF