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

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

PHP odbc_pconnect() Function Usage and Example

PHP ODBC Reference Manual

The odbc_pconnect() function opens a persistent database connection

Syntax

resource odbc_pconnect ( string $dsn , string $user , string $password [, int $cursor_type ] )

Definition and Usage

It opens a persistent database connection

Return Value

It returns the odbc connection ID, and 0 is displayed on failure

Parameter

NumberParameters and Description
1

result_id

Result Identifier

Example

Try the following example

<?php
   $database = "DSN";
   
   if (!($db = odbc_pconnect($database,"user_id","pass_id"))) {
      echo "Could not connect to $database!\n";
      exit;
   }
?>

PHP ODBC Reference Manual