★ wanayoo — archive 1999 http://fr.php.net/manual/function.ingres-connect.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Ingres II
Quick Reference
English version of this pageGerman version of this pageJapanese version of this page
Italian version of this pageFrench version of this pageHungarian version of this page
Spanish version of this pageDutch version of this pageBrazilian Portuguese version of this page
Korean version of this pageCzech version of this page
Ingres II
* ingres_connect
* ingres_pconnect
* ingres_close
* ingres_query
* ingres_num_rows
* ingres_num_fields
* ingres_field_name
* ingres_field_type
* ingres_field_nullable
* ingres_field_length
* ingres_field_precision
* ingres_field_scale
* ingres_fetch_array
* ingres_fetch_row
* ingres_fetch_object
* ingres_rollback
* ingres_commit
* ingres_autocommit

  Thanks to:
 Chek.com
 easyDNS
 VA Linux Systems

  Related sites:
Apache
MySQL
PostgreSQL
Zend Tech.

  Community:
LinuxFund.org
OSDN
Manual: ingres_connect
View the source code for this pageSearch the site



Previous page
 Ingres II
 Updated
Mon, 08 Jan 2001
ingres_pconnect 
Next page


ingres_connect

(PHP 4 >= 4.0.2)

ingres_connect -- Open a connection to an Ingres II database.

Description

resource ingres_connect ([string database [, string username [, string password]]])

Returns a Ingres II link resource on success, or false on failure.

ingres_connect() opens a connection with the Ingres database designated by database, which follows the syntax [node_id::]dbname[/svr_class].

If some parameters are missing, ingres_connect() uses the values in php.ini for ingres.default_database, ingres.default_user and ingres.default_password.

The connection is closed when the script ends or when ingres_close() is called on this link.

All the other ingres functions use the last opened link as a default, so you need to store the returned value only if you use more than one link at a time.

Example 1. ingres_connect() example


<?php
    $link = ingres_connect ("mydb", "user", "pass")
        or die ("Could not connect");
    print ("Connected successfully");
    ingres_close ($link);
?>
     

Example 2. ingres_connect() example using default link


<?php
    ingres_connect ("mydb", "user", "pass")
        or die ("Could not connect");
    print ("Connected successfully");
    ingres_close ();
?>
     

See also ingres_pconnect(), and ingres_close().


 About Notes


Previous page
 Ingres II
 Updated
Mon, 08 Jan 2001
ingres_pconnect 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
France
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.