odbc_columns()函數(shù)列出指定表中的列名。
resource odbc_columns ( resource $connection_id [, string $qualifier [, string $schema [, string $table_name [, string $column_name ]]]] )
它已包含指定表中的列表列名
它返回odbc結(jié)果標(biāo)識符,否則返回false。
序號 | 描述 |
---|---|
1 | connection_id 它包含連接ID信息 |
2 | qualifier 它包含有關(guān)限定符的信息 |
3 | schema 它包含有關(guān)所有者的信息 |
4 | table_name 它包含有關(guān)表名的信息 |
5 | column_name 它包含有關(guān)column_name參數(shù)的信息 |
試試下面的實(shí)例
<?php include('header.php'); $outval = odbc_columns($connection, "Db_name", "%", "table_name", "%"); $pages = array(); while (odbc_fetch_into($outval, $pages)) { echo $pages[3] . "<br />\n"; } ?>