PHP - Fonction pconnect

Syntaxe

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

Définition et utilisation

Il ouvre une connexion de base de données persistante

Valeurs de retour

Il renvoie l'identifiant de connexion odbc ou bien il affichera 0 en cas d'échec

Paramètres

Sr. Non Paramètres et description
1

result_id

Il contient les informations sur l'identificateur de résultat

Exemples

Essayez l'exemple suivant

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