File size: 762 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
Bug #80592 (all floats are the same in ODBC parameters)
--EXTENSIONS--
odbc
--SKIPIF--
<?php include 'skipif.inc'; ?>
--FILE--
<?php
include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);
odbc_exec($conn,"CREATE TABLE bug80592 (f1 float not null, f2 float not null, f3 float not null)"); 
$stmt = odbc_prepare($conn, "INSERT INTO bug80592 (f1, f2, f3) values (?, ?, ?)");
odbc_execute($stmt, [1.0, 2.0, 3.0]);
$res = odbc_exec($conn, "SELECT f1, f2, f3 from bug80592");
var_dump(odbc_fetch_array($res));
?>
--CLEAN--
<?php
include 'config.inc';

$conn = odbc_connect($dsn, $user, $pass);
odbc_exec($conn, "DROP TABLE bug80592");
?>
--EXPECT--
array(3) {
  ["f1"]=>
  string(3) "1.0"
  ["f2"]=>
  string(3) "2.0"
  ["f3"]=>
  string(3) "3.0"
}