mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
65364fe7d0
For unixODBC, use ODBC version as defined by it (as of v2.2.14 it is 3.5). This allows us to use newer features like SQL_DESC_OCTET_LENGTH (which returns the number of bytes required to store the data). This fixes the issue in #60616. If the newer version is not available, over-allocate to accomodate 4-byte Unicode characters for CHAR and VARCHAR datatypes (and their Wide counterparts). version. Fixed a couple of failing tests.
29 lines
615 B
PHP
29 lines
615 B
PHP
--TEST--
|
|
odbc_columns(): Basic test
|
|
--SKIPIF--
|
|
<?php include 'skipif.inc'; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
include 'config.inc';
|
|
|
|
$conn = odbc_connect($dsn, $user, $pass);
|
|
|
|
var_dump($result = odbc_columns($conn, '', '', '', ''));
|
|
var_dump(odbc_fetch_row($result));
|
|
|
|
var_dump($result = odbc_columns($conn, NULL, NULL, NULL, NULL));
|
|
var_dump(odbc_fetch_row($result));
|
|
|
|
var_dump($result = odbc_columns($conn, 'FOO', 'FOO', 'FOO', 'FOO'));
|
|
var_dump(odbc_fetch_row($result));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
resource(%d) of type (odbc result)
|
|
bool(false)
|
|
resource(%d) of type (odbc result)
|
|
bool(false)
|
|
resource(%d) of type (odbc result)
|
|
bool(false)
|