Closed ElodieBergonnier closed 6 years ago
Offhand, I'm not seeing any reason why the float would be cast to a string. If you pass the values of $query
and $args
to var_dump()
around this line, you should be able to double-check the data type. Please include that output here and we can proceed from there.
Thank you for your quick answer.
Here is the output:
query =
INSERT INTO s_com_pop
(com, cataeu99, cataeu10, superf)
VALUES
(?, ?, ?, ?)
args = array(4) {
[0]=>
string(5) "31555"
[1]=>
string(1) "1"
[2]=>
string(3) "111"
[3]=>
float(118.3)
}
The 118.3 value is correctly stored as float. The problem should be elsewhere...
This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity since it was marked as stale. Thank you for your contributions.
Hello,
I am trying to initialize an Oracle XE database using a DbUnit_ArrayDataSet into the getDataSet() function.
The table is created using the query below:
The code below gives the initialization of the table s_com_pop :
During the execution, this error is displayed:
So far, I have been able to track the issue to the 118.3 value. When I use an integer value (ex : 118), the query is correctly executed. So my guess is that the float value 118.3 is somehow converted to string during the process.
Some other clues:
INSERT INTO s_com_pop (com, cataeu99, cataeu10, superf) VALUES ('31555', '1', '111', 118.3);
throws no error when directly run into Oracle.Best regards,