English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

PHP odbc_columns() Function Usage and Example

PHP ODBC Reference Manual

The odbc_columns() function lists the column names in the specified table.

Syntax

resource odbc_columns ( resource $connection_id[, string $qualifier[, string $schema[, string $table_name[, string $column_name]]]] )

Definition and Usage

It already contains a list of column names in the specified table

Return value

It returns an odbc result identifier, otherwise it returns false.

Parameter

NumberDescription
1

connection_id

It contains connection ID information

2

qualifier

It contains information about the qualifier

3

schema

It contains information about the owner

4

table_name

It contains information about the table name

5

column_name

It contains information about the column_name parameter

Example

Try the following example

<?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";
   }
?>

PHP ODBC Reference Manual