|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2021-01-05 14:29 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2021-01-05 23:26 UTC] cmb@php.net
[2021-01-06 12:56 UTC] cmb@php.net
[2021-01-06 12:56 UTC] cmb@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 16:00:01 2025 UTC |
Description: ------------ 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'); odbc_execute($st2); echo json_encode(odbc_fetch_object($st2)); Expected result: ---------------- {"f1":"1.0","f2":"2.0","f3":"3.0"} Actual result: -------------- {"f1":"3.0","f2":"3.0","f3":"3.0"}