1--TEST--
2odbc_field_scale(): Getting the scale of the field
3--EXTENSIONS--
4odbc
5--SKIPIF--
6<?php include 'skipif.inc'; ?>
7--FILE--
8<?php
9
10include 'config.inc';
11
12$conn = odbc_connect($dsn, $user, $pass);
13
14odbc_exec($conn, 'CREATE TABLE field_num (foo INT, bar REAL, baz VARBINARY(50))');
15
16$res = odbc_exec($conn, 'SELECT * FROM field_num');
17var_dump(odbc_field_num($res, "foo"));
18var_dump(odbc_field_num($res, "bar"));
19var_dump(odbc_field_num($res, "baz"));
20var_dump(odbc_field_num($res, "nonexistent"));
21
22?>
23--CLEAN--
24<?php
25require 'config.inc';
26$conn = odbc_connect($dsn, $user, $pass);
27odbc_exec($conn, 'DROP TABLE field_num');
28?>
29--EXPECTF--
30int(1)
31int(2)
32int(3)
33bool(false)
34