bug80592.phpt 762 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. Bug #80592 (all floats are the same in ODBC parameters)
  3. --EXTENSIONS--
  4. odbc
  5. --SKIPIF--
  6. <?php include 'skipif.inc'; ?>
  7. --FILE--
  8. <?php
  9. include 'config.inc';
  10. $conn = odbc_connect($dsn, $user, $pass);
  11. odbc_exec($conn,"CREATE TABLE bug80592 (f1 float not null, f2 float not null, f3 float not null)");
  12. $stmt = odbc_prepare($conn, "INSERT INTO bug80592 (f1, f2, f3) values (?, ?, ?)");
  13. odbc_execute($stmt, [1.0, 2.0, 3.0]);
  14. $res = odbc_exec($conn, "SELECT f1, f2, f3 from bug80592");
  15. var_dump(odbc_fetch_array($res));
  16. ?>
  17. --CLEAN--
  18. <?php
  19. include 'config.inc';
  20. $conn = odbc_connect($dsn, $user, $pass);
  21. odbc_exec($conn, "DROP TABLE bug80592");
  22. ?>
  23. --EXPECT--
  24. array(3) {
  25. ["f1"]=>
  26. string(3) "1.0"
  27. ["f2"]=>
  28. string(3) "2.0"
  29. ["f3"]=>
  30. string(3) "3.0"
  31. }