|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80592 all floats are the same in ODBC parameters
Submitted: 2021-01-05 13:44 UTC Modified: 2021-01-05 14:29 UTC
From: a dot kasparas at gmc dot lt Assigned:
Status: Closed Package: ODBC related
PHP Version: 8.0.0 OS: Windows 10 Pro
Private report: No CVE-ID: None
 [2021-01-05 13:44 UTC] a dot kasparas at gmc dot lt
Floats submitted over prepared statement parameters are all set to the same (last?) value.

Test script:
On SQL server create table for tests:

CREATE TABLE float_test(
F1 float not null,
F2 float not null,
F3 float not null

Create ODBC connection FLOAT_TEST using available driver for SQL server;

Then execute:

$o = odbc_connect('FLOAT_TEST', 'user', 'pass');
$st_txt = 'INSERT INTO float_test (f1, f2, f3) values (?, ?, ?)';
odbc_exec($o, 'DELETE FROM float_test');
$st = odbc_prepare($o, $st_txt);
odbc_execute($st, array(1.0, 2.0, 3.0));
$st2 = odbc_prepare($o, 'SELECT f1, f2, f3 from float_test');
echo json_encode(odbc_fetch_object($st2));

Expected result:

Actual result:


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-05 14:29 UTC]
-Status: Open +Status: Verified
 [2021-01-05 23:26 UTC]
The following pull request has been associated:

Patch Name: Fix #80592: all floats are the same in ODBC parameters
On GitHub:
 [2021-01-06 12:56 UTC]
Automatic comment on behalf of
Log: Fix #80592: all floats are the same in ODBC parameters
 [2021-01-06 12:56 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 12 23:01:29 2024 UTC