xref: /PHP-7.4/ext/pdo_odbc/tests/bug44643.phpt (revision 23a3bbb4)
1--TEST--
2Bug #44643 (bound parameters ignore explicit type definitions)
3--SKIPIF--
4<?php
5if (!extension_loaded('pdo_odbc')) die('skip pdo_odbc extension not available');
6require 'ext/pdo/tests/pdo_test.inc';
7PDOTest::skip();
8?>
9--FILE--
10<?php
11require 'ext/pdo/tests/pdo_test.inc';
12$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
13$sql = "SELECT * FROM (SELECT 'test' = :id1) a WHERE a.test = :id2";
14$stmt = $db->prepare($sql);
15$id1 = 1;
16$stmt->bindParam(':id1', $id1, PDO::PARAM_INT);
17$id2 = 1;
18$stmt->bindParam(':id2', $id2, PDO::PARAM_INT);
19var_dump($stmt->execute());
20?>
21--EXPECT--
22bool(true)
23