<?php
$conn = odbc_connect($dsn, $user, $pass);
$statistics = odbc_statistics($conn, 'TutorialDB', 'dbo', 'TEST', SQL_INDEX_UNIQUE, SQL_QUICK);
while (($row = odbc_fetch_array($statistics))) {
print_r($row);
break; // Следующие строки опустили для краткости
}
?>
Вывод приведённого примера будет похож на:
Array
(
[TABLE_CAT] => TutorialDB
[TABLE_SCHEM] => dbo
[TABLE_NAME] => TEST
[NON_UNIQUE] =>
[INDEX_QUALIFIER] =>
[INDEX_NAME] =>
[TYPE] => 0
[ORDINAL_POSITION] =>
[COLUMN_NAME] =>
[ASC_OR_DESC] =>
[CARDINALITY] => 15
[PAGES] => 3
[FILTER_CONDITION] =>
)